Improve Rebuy Smart Cart load speed
By default Shopify loads all apps after the regular Shopify site has finished loading. This means Rebuy is not allowed to run until after the site has finished loading which can sometimes take 3-4 seconds or longer to load features such as Smart Cart, Widgets, etc..
We can improve the load time by install a Rebuy JS Script Tag into your theme and Disabling Rebuy JS on the Rebuy administrative portal side. If enabled this will install a Rebuy script tag to the theme.liquid file of your store and disable Rebuy from loading in the head of the document. Doing this will load Rebuy as fast as possible within your website.
How to Install Rebuy Script Tag and Disable Rebuy JS
Step 1: Login to the Rebuy Admin Portal
The first step to installing the Rebuy Script Tag and disabling Rebuy JS is to login to the Rebuy admin portal.
Step 2: Head to the Settings Tab
Once you have logged in, navigate to the settings tab. This can be found on the left navigation bar of the admin portal.
Step 3: Select App Settings
In the settings tab, you will see a list of different settings for your Rebuy account. Look for the option that says "App Settings" and click on it.
Step 4: Toggle on "Install Rebuy Script Tag and Disable Rebuy JS"
In the App Settings page, you will see a toggle button for "Install Rebuy Script Tag and Disable Rebuy JS." Make sure this toggle is switched on to enable the installation of the Rebuy Script Tag and disable Rebuy JS.
This setting now relies on the new Rebuy Connector App Embed Block on Shopify.
Please ensure that the Rebuy Connector is enabled on your current theme. You can do that by navigating to the app embeds section of your Shopify settings and verifying that it is toggled on!
The Rebuy Connector π may already be enabled in your settings if you had previously set it up during your onboarding process or when enabling a separate feature which requires it. We recommend you confirming this just to be certain that it is toggled on. You can do this by clicking the link on the settings as seen in the gif below.
Alternatively you can navigate to your Shopify settings > sales channels > online store > click "customize" on your live theme > click "app embeds" on the left-hand navigation > confirm that the Rebuy Connector is toggled on.
Secondary Install Option (Deprecated)
The second option you have is to manually inserting this into your theme. In your theme's theme.liquid file, add the following script tag before the closing body tag:
<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?shop={{ shop.permanent_domain }}"></script>