Improve Rebuy Smart Cart load speed
By default, Shopify loads apps only after the main site has finished loading. This means that Rebuy cannot run until the entire site is ready, which can result in delays of 3-4 seconds or more before features like Smart Cart, Widgets, Smart Search and others are available.
To speed up this process, you can install the Rebuy JS Script Tag into your theme and disable Rebuy JS through the Rebuy admin portal. Enabling this option will add the Rebuy script tag to your store's theme.liquid file, and prevent Rebuy from loading in the document’s header. This ensures that Rebuy loads as quickly as possible.
This improvement will benefit key features such as Smart Cart, Smart Search, and Merchandising Widgets, along with other Rebuy functionalities.
How to Install the Rebuy Script Tag and Disable Rebuy JS
Step 1: Log in to the Rebuy Admin Portal
First, log in to your Rebuy admin portal using your credentials.
Step 2: Navigate to the Settings Tab
Once logged in, go to the Settings tab on the left-hand side of the admin portal.
Step 3: Select "App Settings"
In the Settings section, find and click on the "App Settings" option.
Step 4: Enable Script Tag Installation and Disable Rebuy JS
Within the App Settings page, look for the toggle labeled "Install Rebuy Script Tag and Disable Rebuy JS." Turn this toggle on to install the 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>