Does a headless storefront break pixel tracking?
By the HonestTag team ยท Published October 27, 2026
A headless storefront does not stop orders being recorded. It takes away the pages where the ad click is. HonestTag's pixel runs on Shopify's checkout and order pages, but not on a storefront built with Hydrogen or another framework. That storefront is where a shopper lands from an ad, with the ad's click ID in its address. So HonestTag's pixel can fire on every checkout while none of those orders is tied to an ad. Both are true at once. Code on the storefront that records the click, and a cookie the checkout can read, puts the two halves back together.
Install HonestTag free and run the Mirror plan beside your current tracking. It sends no purchases or conversions to your ad platforms, so it cannot double-count a sale or change your current setup, and it shows which platform claims hold up against the new customers in your real orders. Free at any store size.
What "headless" means
Shopify says "Headless commerce separates your storefront's frontend from its backend. You build the frontend, and Shopify's APIs handle the commerce underneath." You choose "the stack, framework, and hosting for your frontend," and Shopify says "Commerce capabilities include the cart, checkout, and international pricing" (Shopify: About headless commerce). Shopify's own toolkit for this is Hydrogen: "Hydrogen is Shopify's headless toolkit," and it does not include checkout UI "because checkout stays on Shopify" (Shopify: Hydrogen).
So a headless store has two parts. The storefront, the home page, collections and product pages, is your own site, built with Hydrogen or another framework. The checkout is still Shopify's.
Which pages a Shopify pixel runs on
Shopify says "Pixels automatically load on the Storefront, Checkout, Thank you page, and Order status page" (Shopify Help: Pixels overview). For apps, Shopify says a web pixel "is able to load in the shop's online store" (Shopify: About web pixels). HonestTag's pixel runs on Shopify's checkout and order pages, but not on a storefront built with Hydrogen or another framework. Checkout stays on Shopify, and that is where the pixel still runs. For how an app pixel differs from a custom pixel and what its sandbox allows, read Shopify custom pixel vs app pixel.
This is not only about HonestTag. Asked whether apps stop working when a store goes headless, a Shopify staff member answered: "The information you've read is correct. You'll need to hope that the app you want to use has an API that you can integrate with" (Shopify developer community, March 2026).
Why the click ID is on the landing page, not at checkout
An ad click can carry a click ID in the address of the page the shopper lands on. TikTok, for example, describes its click ID as "a data connection parameter appended to a landing page URL whenever a user clicks on an ad on TikTok" (TikTok Events API). The click ID arrives on that landing page. Whatever ties the order to the ad has to read it there and keep it until checkout.
A cookie the storefront and checkout share
A cookie is a small value a browser keeps for a website. A cookie set for a domain, like example.com, can be read on that domain and on its subdomains, like shop.example.com and checkout.example.com. MDN puts it this way: "Setting the domain makes the cookie available to that domain and all its subdomains" (MDN: Set-Cookie). A cookie on example.com cannot be read on an unrelated domain.
Shopify's Hydrogen consent guide, which Shopify says refers to "Hydrogen versions 2026-04 and earlier," says to "assign a subdomain for your storefront to checkout. For example, if your Hydrogen store is example.com, then assign checkout.example.com to checkout" (Shopify: Hydrogen consent).
Tie headless store clicks to orders. On every plan, HonestTag's Setup tab gives you a short script or Hydrogen component made for your store, so ad clicks on a headless storefront can be tied to the order.
A month in counts
The numbers below are made up to show the arithmetic. They are not from a real store and not an estimate of what any store will see.
- Orders the store has this month: 400. All 400 are in Shopify, and all 400 went through Shopify's checkout.
- Shoppers who landed on the storefront from an ad, with a click ID in the address: 150.
- Of those 150, shoppers who went on to check out: 50. The other 100 left without buying.
- Of those 50 orders, how many the checkout pixel alone can tie to a click: 0. The click ID was on a storefront page, and the pixel never ran there.
- Of those 50 orders, how many storefront code plus the shared cookie ties to a click: 44, in this example. The other 6: for 4 shoppers, Shopify's Customer Privacy API did not allow analytics and marketing, so the click was not recorded for them, and 2 reached checkout before the code was added.
Before the storefront code, the pixel fired on all 400 checkouts and 0 orders were tied to an ad click. Both statements are true at once, because the pixel and the click were on different pages. With the code, 44 of the 50 ad-click orders are tied to their click. The order count is 400 either way.
Why tracking goes quiet on a headless store
One merchant asked whether separating the frontend and backend "(Next.js + Shopify)" affects how pixels work (Shopify Community, January 2026). These are the usual reasons tracking on such a store goes quiet.
- The pixel does not run on the storefront. HonestTag's pixel does not run on a storefront built with Hydrogen or another framework. Shopify says pixels "automatically load on the Storefront, Checkout, Thank you page, and Order status page." On a headless store, HonestTag's pixel sees the checkout, and nothing before it.
- The storefront code was never added, or something blocks it. Code that records the click has to be on the storefront pages. If it is added but the store's content security policy does not allow the address it sends to, the browser blocks the request. Shopify's legacy Hydrogen consent guide has a step to "Add your domains to your content security policy" for the store and checkout domains. HonestTag's Hydrogen instructions add a different entry: the HonestTag address, in
connectSrc. - The checkout is on a domain the storefront does not share. If the storefront is on
example.comand the checkout is on an unrelated domain, such as the store'smyshopify.comaddress, the checkout cannot read a cookie the storefront set. The click is recorded, but nothing joins it to the order. - Tracking is not allowed for the shopper. Shopify's Customer Privacy API applies consent decisions "to Shopify-managed surfaces, like pixels, audiences, and checkout," and reports separately whether marketing ("Marketing, attribution and targeted advertising from the merchant") and analytics are allowed for the visitor (Shopify: Customer Privacy API). Code that follows it sends nothing when analytics and marketing are not allowed for that shopper. Shopify says that for regions configured to require consent, "non-essential purposes are not allowed by default until consent is given," and that "For other regions, the default behavior is to allow all processing purposes." Sending nothing when they are not allowed is the code doing its job, not a fault. Cookie banners and conversions shows what that does to the counts.
- Looking for storefront data in Shopify's own reports. Another merchant, on a Nuxt store, wrote "i'd like to see more data in the Analytics page" (Shopify Community, March 2025). Shopify says its analytics "powers the reports in the Shopify admin, like sessions, conversion, and top products." For Hydrogen storefronts, Shopify says "Hydrogen sends the same events that Liquid themes send" (Shopify: Add analytics and consent). Those reports depend on what the storefront sends Shopify. HonestTag's storefront code sends its events to HonestTag, not to Shopify's reports, so adding it does not fill the Analytics page.
The trade-offs
- It needs a developer. A store on a Shopify theme needs no code. A headless store is the one case where someone adds a short piece of code to the storefront.
- The storefront code does not replace the checkout pixel. It records the ad click and the visitor ID. The checkout is still covered by Shopify's pixel, and orders still come from Shopify.
- Order counts do not change. HonestTag receives every order from Shopify with or without the storefront code. What the code changes is whether an order can be joined to the ad click that brought the shopper.
- Not every click is joined. Nothing is sent and no cookie is set until Shopify's Customer Privacy API has loaded and allows both analytics and marketing for that shopper. A shopper who reached checkout before the code was added can keep the visitor ID the checkout gave them. A storefront that is not on the shared domain cannot set the shared cookie.
What HonestTag does
Shopify's pixel covers checkout. On a headless store, a short storefront script, or on Hydrogen a component, records the ad click, and the checkout reads the same visitor ID from a cookie on the domain the storefront and checkout share. In more detail:
- Where the code comes from. In the HonestTag app, on every plan, the Setup tab has a card called Headless or Hydrogen storefront? You type the domain your storefront and checkout share, like
example.com, and select Show my code; the card shows code made for your store, with your HonestTag address filled in: a component for Hydrogen 2026-10 and later, an older one for Hydrogen 2026-04 and earlier, and a script for any other framework. It refuses amyshopify.comaddress, because that cannot share a cookie with your storefront. - What it records. On the page a shopper lands on, it sends HonestTag that page's address once for each distinct set of URL parameters, and HonestTag reads the ad click IDs and UTM tags from it. It also sends a page view with the page's path, a random visitor ID, and the
_gaand_fbpcookie values when those cookies are already present. It sends no name, email, address or order detail. - The cookie. The visitor ID is saved in a first-party cookie named
ht_vidon the shared domain, for one year. On your checkout, HonestTag's Shopify pixel reads that same cookie, so the order and the ad click carry the same visitor ID. If the storefront page is not on the domain you typed, the checkout gets its own visitor ID, the click is not joined, and the browser console says so. - Consent. Nothing is sent and no cookie is set until Shopify's Customer Privacy API has loaded 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. For a shopper in the EU, EEA, UK or Switzerland, it waits for the shopper's own yes even where your Shopify settings do not ask for consent there. It checks again before each send, so if a shopper withdraws, the next page sends nothing. If the API never loads on your storefront, the code sends nothing and says so in the browser console.
- Delivery. On a paid plan, orders from your headless or Hydrogen storefront reach your ad platforms from HonestTag's server the same way as orders from a Shopify theme store (server-side tracking explains how). If Shopify does not mark them as web orders and their sales channel's name has neither Hydrogen nor Headless in it, switch that channel on in the app's Sales channels page; server-side conversion delivery has the rule. The free Mirror plan sends no purchases to ad platforms.
The steps for adding the code are in Headless and Hydrogen stores.
Frequently asked questions
Will my Shopify app pixels work on a headless storefront?
On the checkout, yes: Shopify says pixels "automatically load" on Checkout, and checkout stays on Shopify. Shopify's pixel docs say an app web pixel "is able to load in the shop's online store." They do not say it loads on a storefront built with Hydrogen or another framework. HonestTag's pixel runs on checkout and order pages, and not on that storefront, so the ad click on the landing page has to come from code you add.
Will my order count change after I add the storefront code?
No. HonestTag receives every order from Shopify either way. The storefront code changes whether an order can be joined to the ad click that brought the shopper.
Why does my checkout need to be on a subdomain of my storefront's domain?
Because a cookie set for a domain can be read on that domain and its subdomains, and not on an unrelated domain. With the storefront on example.com and the checkout on checkout.example.com, the checkout can read the visitor ID the storefront saved.
Does HonestTag send anything before Shopify's Customer Privacy API allows it?
No. Nothing is sent and no cookie is set until Shopify's Customer Privacy API has loaded 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. In the EU, EEA, UK and Switzerland it waits for the shopper's own yes.
Tie headless store clicks to orders
On every plan, HonestTag's Setup tab gives you a short script or Hydrogen component made for your store, so ad clicks on a headless storefront can be tied to the order.
- No risk to your setup. The Mirror plan sends no purchases or conversions to your ad platforms, so it cannot double-count a sale or change your current setup.
- Claims against real orders. It shows what Google Ads, Meta, Microsoft Advertising and TikTok claim beside the new customers whose first recorded ad click or ad-tagged link was that platform, counted from your own orders.
- Free at any store size. The Mirror plan stays free whatever your sales.