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

Script Tag Installation

The Rebuy Connector enables optimized script loading by injecting the Rebuy script tag directly into your theme via Liquid. This allows Rebuy to load earlier in the page lifecycle, reducing delays for features like Smart Cart, Widgets, and Smart Search.

When enabled in combination with the "Install Rebuy Script Tag and Disable Rebuy JS" setting in Rebuy Admin, the Connector outputs:

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

To configure:

  1. Ensure the Rebuy Connector is enabled in your theme's App Embeds
  2. In Rebuy Admin, navigate to Settings > App Settings
  3. Enable Install Rebuy Script Tag and Disable Rebuy JS

Important

Do not disable Rebuy JS in the admin before confirming the Rebuy Connector is active on your theme, or Rebuy features will not load.

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

Customer Tags

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

When enabled, the Connector makes the logged-in customer's tags available to Rebuy's client-side library, allowing you to create targeted experiences using Smart Flows conditions.

To configure:

  1. Ensure the Rebuy Connector is enabled in your theme's App Embeds
  2. In Rebuy Admin, navigate to Settings > App Settings
  3. Enable Expose Customer Tags

Once enabled, you can use customer tags as conditions in Smart Flows to target specific customer segments.

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 enabling Script Tag installation:
Verify the Rebuy Connector is toggled 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 "Expose Customer Tags" setting is enabled in Rebuy Admin.
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