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>
---
title: Manual Installation
excerpt: Add Rebuy.JS to your theme code yourself for custom setups
deprecated: false
hidden: false
metadata:
title: ''
description: ''
robots: index
next:
description: ''
---
!!! tip "Use the Rebuy Connector for most stores"
The [Rebuy Connector](../guides/rebuy-connector.md) 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](https://help.shopify.com/en/manual/online-store/themes/theme-structure/extend/edit-theme-code)), add the following script tag before the closing body tag.
```html
<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?shop={{ shop.permanent_domain }}"></script>
```
Then, in [Rebuy Admin](https://rebuyengine.com/admin/app-settings/) 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.
```html
<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.
```html
<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?assets=stylesheet&shop={{ shop.permanent_domain }}"></script>
```