Skip to content

Rebuy Connector

The Rebuy Connector is a Shopify App Embed that enables advanced Rebuy features by outputting Liquid directly within your theme. It serves as the bridge between Shopify's server-side capabilities and Rebuy's client-side functionality.

Overview

The Rebuy Connector is a Global App Embed block that must be enabled in your Shopify theme settings. Once enabled, it provides access to features that require server-side Liquid rendering, such as optimized script loading and real-time customer data.

Enabling the Rebuy Connector

  1. In your Shopify admin, navigate to Online Store > Themes
  2. Click Customize on your active theme
  3. In the theme editor, click App embeds in the left sidebar
  4. Toggle Rebuy Connector to enabled
  5. Click Save

Alternatively, you can access the App Embeds directly via: https://[your-store].myshopify.com/admin/themes/current/editor?context=apps

Per-Theme Setting

The Rebuy Connector must be enabled on each theme where you want Rebuy features to work. If you have multiple themes (e.g., a staging theme), remember to enable the Connector on each one.

Features

Load Rebuy JS

The Rebuy Connector loads Rebuy JS from your theme's <head>, so Rebuy starts earlier in the page lifecycle. This reduces delays for features like Smart Cart, Widgets, and Smart Search.

When Enable Rebuy JS via Rebuy Connector is on in Rebuy Admin, the Connector outputs:

<link rel="preconnect" href="https://cdn.rebuyengine.com">
<link rel="preconnect" href="https://rebuyengine.com" crossorigin>
<link rel="preconnect" href="https://cached.rebuyengine.com" crossorigin>
<script async src="https://cdn.rebuyengine.com/onsite/js/rebuy.js?shop={{ shop.permanent_domain }}"></script>

To configure:

  1. Turn on the Rebuy Connector in your theme's App Embeds (see Enabling the Rebuy Connector)
  2. In Rebuy Admin, go to Settings > App Settings
  3. Under Load Rebuy through the Rebuy Connector, make sure Enable Rebuy JS via Rebuy Connector is on (new installs have it on already)

Important

Turn on the Rebuy Connector in your theme before you turn on Enable Rebuy JS via Rebuy Connector. The setting only loads Rebuy when the Connector is active on your theme. If the Connector is off, Rebuy features will not load.

Legacy script tag

App Settings also has an Enable Rebuy JS via script tag (legacy, ends Mar 1, 2027) toggle. It loads Rebuy through a Shopify script tag, which Shopify is deprecating. This method stops working on March 1, 2027, so load Rebuy through the Rebuy Connector instead.

If both methods are on, Rebuy loads once and logs a rebuy.js already loaded warning in the browser console. The warning is harmless.

For more details on optimizing load times, see the Load Rebuy Faster help article.

Customer Tags

The Rebuy Connector automatically exposes Shopify customer tags to Rebuy, enabling real-time personalization in Smart Flows based on customer segmentation.

When the Connector is enabled, it makes the logged-in customer's tags available to Rebuy's client-side library, allowing you to create targeted experiences using Smart Flows conditions. No additional configuration is required beyond enabling the Connector itself.

Use Cases

  • Show VIP-exclusive offers to customers tagged as "VIP"
  • Display loyalty rewards to customers tagged with membership tiers
  • Target wholesale customers with B2B-specific messaging
  • Personalize upsells based on customer purchase history tags

Technical Details

The Rebuy Connector works by rendering a small Liquid snippet within the <head> or <body> of your theme (depending on configuration). This snippet:

  • Reads from Rebuy app metafields to determine which features are enabled
  • Outputs the appropriate Liquid/JavaScript based on your settings
  • Makes server-side Shopify data (like customer tags) available to client-side Rebuy features

Because the Connector uses Shopify's native App Embed system, it automatically loads on all pages where app embeds are supported and requires no manual theme code modifications.

Troubleshooting

Rebuy features not loading after turning on Enable Rebuy JS via Rebuy Connector:
Verify the Rebuy Connector is turned on in your theme's App Embeds. The setting in Rebuy Admin only works when the Connector is active.
Customer tags not appearing in Smart Flows:
Ensure the customer is logged in. Customer tags are only available for authenticated customers. Also verify the Rebuy Connector is enabled in your theme's App Embeds.
Connector not visible in App Embeds:
Try refreshing the page or re-opening the theme editor. If the issue persists, reinstall the Rebuy app or contact support.
See something that needs updating? Suggest an edit