Shopify setup

Bolt checkout tracking for Shopify

Connect Bolt purchases to the RetailerBoost ad visits that led to them. Use this guide if your Shopify storefront takes payment through Bolt.

View Markdown

Find your RetailerBoost Store ID source_id

Use your RetailerBoost Store ID as source_id by replacing YOUR_STORE_ID in the sample.

In the Shopify app

  1. In Shopify admin, go to Apps → RetailerBoost Ads → Conversion tracking.
  2. Under RetailerBoost Store ID, select Copy Store ID.
Example Shopify app Conversion tracking page with the RetailerBoost Store ID and Copy Store ID button below the pixel status.

In the RetailerBoost dashboard

Open the RetailerBoost dashboard
  1. Select the store that uses Bolt.
  2. Go to Settings → Store Information → Store ID and select the copy icon.

The same ID appears in the first segment of your dashboard URL, for example https://dashboard.retailerboost.com/YOUR_STORE_ID/settings.

Connect the visit to the paid order

Keep the RetailerBoost Shopify app installed. Capture the existing RetailerBoost visitor ID (_rb_vid) from the storefront before opening Bolt, honoring the shopper’s consent. Save it against a cart, checkout, or order reference that your server can match to the final Shopify order.

Use a signed Shopify paid-order webhook if Bolt creates a paid Shopify order with a matching reference. Otherwise, use a signed Bolt payment notification, confirm the completed transaction with Bolt on your server, and match it to the final Shopify order. Send the conversion once per paid order and reuse the same Shopify order ID for any retries.

If you use Bolt’s storefront success callback, keep its existing checkout-completion behavior. Use the callback to pass the visitor ID and Bolt reference to your server, where you can confirm payment. A customer closing the browser should not prevent your paid-order webhook from running.

Send a conversion from your server

Call this function with values from the paid order and the visitor ID saved at checkout. Pass the final Shopify order ID as a string, the merchandise subtotal after discounts in minor units, and the order’s three-letter currency. Exclude shipping and tax from the subtotal. For example, $89.95 USD is 8995.

The [Bolt] label lets support find the submission by checkout provider. The original Shopify order ID stays in order_id so the same order can be recognized across tracking methods.

async function reportRetailerBoostBoltPurchase({
  shopifyOrderId,
  visitorId,
  subtotalCents,
  currency,
  boltReference
}) {
  const orderId = String(shopifyOrderId ?? "")
    .replace(/^gid:\/\/shopify\/Order\//, "");
  const visitorIdPattern = /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i;

  if (!/^\d+$/.test(orderId) || !visitorIdPattern.test(visitorId ?? "") ||
      !Number.isSafeInteger(subtotalCents) || subtotalCents <= 0 ||
      !/^[A-Z]{3}$/.test(currency ?? "") || !boltReference) {
    throw new Error("Missing or invalid RetailerBoost order fields");
  }

  const response = await fetch("https://s1.rbrun.com/api/conversion", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      source_id: "YOUR_STORE_ID",
      vid: visitorId,
      order_id: orderId,
      order_number: orderId + " [Bolt]",
      order_total_cents: subtotalCents,
      currency,
      meta: { checkout_provider: "bolt", bolt_reference: boltReference }
    })
  });

  if (!response.ok) {
    throw new Error("RetailerBoost conversion HTTP " + response.status);
  }
}

Verify the connection

On a copy of your theme, check cart checkout and Buy Now if both are available. Use a sandbox to inspect the request without sending sandbox orders to your live RetailerBoost store ID.

After installation, send RetailerBoost support the Shopify order ID and Bolt transaction reference for one confirmed purchase. We can check that the order was recorded once, that the subtotal and currency match, and that a visit from RetailerBoost was attributed when applicable.