Skip to content

Manual Installation

Use the Rebuy Connector for most stores

The Rebuy Connector already loads Rebuy JS early from your theme's <head>, with no theme code changes. Use manual installation only when you need to control exactly where or how Rebuy loads.

Adding the Rebuy Script Tag

In your theme's theme.liquid file (see Shopify's guide to editing theme code), 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>

Then, in Rebuy Admin under Settings > App Settings, turn off Enable Rebuy JS via Rebuy Connector and Enable Rebuy JS via script tag (legacy, ends Mar 1, 2027), and save.

If Rebuy has already loaded, it returns without initializing again and logs a rebuy.js already loaded warning in the browser console. Turning off the other loading methods keeps Rebuy from trying to load more than once.

Only Load Rebuy.JS

It is also possible to only load in Rebuy.JS without the CSS package. This is useful if you would like to utilize your custom theme CSS.

<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?assets=javascript&shop={{ shop.permanent_domain }}"></script>

Only Load Rebuy CSS

It is also possible to only load Rebuy CSS without the JavaScript. This can be useful if your application is using our REST API with custom JavaScript.

<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?assets=stylesheet&shop={{ shop.permanent_domain }}"></script>
See something that needs updating? Suggest an edit