Headless and Hydrogen stores

By the HonestTag team ยท Published September 28, 2026

If your storefront is built with Hydrogen or another framework instead of a Shopify theme, HonestTag still receives every order from Shopify, and its pixel still runs on your Shopify checkout. What it cannot see without one more step is the page a shopper lands on from an ad, which is where the ad's click ID is. A short piece of code on your storefront records that click and gives your checkout the same visitor ID, so the order can be matched to it.

What Shopify runs and what it does not

HonestTag's pixel is a Shopify app pixel. Shopify says app pixels load on the storefront, checkout, thank you page and order status page it hosts. A storefront you host yourself is not one of those pages, and Shopify's own developer staff confirm that apps do not run on a headless storefront. So on a headless store the pixel sees your checkout, and the storefront code covers the pages before it.

Before you start

Your checkout has to be on a subdomain of your storefront's domain, like checkout.example.com for a store at example.com. Shopify's Hydrogen setup asks for the same thing. The storefront code saves the visitor ID in a cookie for that shared domain, and browsers only share a cookie between a domain and its subdomains, so this is how the checkout reads it.

How to install it

  1. Open the Setup tab in the app and find Headless or Hydrogen storefront?
  2. Type the domain your storefront and checkout share, like example.com, and select Show my code. The code is made for your store, with your HonestTag address filled in.
  3. Hydrogen: save the component as app/components/HonestTag.jsx and render <HonestTag /> inside <Analytics.Provider> in app/root.jsx. It uses Hydrogen's own analytics events, so it hears every page view your routes report. Add the HonestTag address the card shows to connectSrc in createContentSecurityPolicy in app/entry.server.jsx, or your content security policy blocks it.
  4. Any other framework: add the script to every page, before the closing </body> tag, and load Shopify's Customer Privacy API on the same pages. If your pages change without a full reload, call window.HonestTag.page() after each change.
  5. Check it: open your storefront, then open Orders in the app. A page view from your storefront shows under Live activity within a few seconds.

What the code sends

It sends no name, email, address or order detail. Orders still come to HonestTag from Shopify.

Consent

Nothing is sent and no cookie is set until Shopify's Customer Privacy API has loaded on the page and allows both analytics and marketing for that shopper. When the shopper actively said yes, the code says so; when they are in a region where processing is allowed until they refuse, it says that instead, and HonestTag never reports it as a yes. If the shopper refuses or withdraws, the next page sends nothing. If the Customer Privacy API never loads on your storefront, the code sends nothing and says so in the browser console.

Limits

Related