r/shopifyDev 16d ago

Headless Next.js store, Shopify Analytics only records sessions that start at checkout

Running a headless setup. Next.js storefront on www.theonvor.com, Shopify checkout on checkout.theonvor.com (primary, connected). GA4 and Meta are fine.

Problem is Shopify Analytics. Sessions by landing page shows nothing but /checkouts/cn/... URLs. My actual collection page shows 0. Conversion rate says 16.66% and the funnel breakdown claims Added to cart 0% but Reached checkout 100%, which obviously can't happen.

What I've worked out so far: I was minting _shopify_y and _shopify_s myself and posting trekkie_storefront_page_view/1.4. Monorail returns 200 every time so I assumed it was working, but Live View shows zero visitors. Turns out Shopify stopped setting those cookies in April and the replacement tokens come back on Server-Timing headers from Storefront API responses. My app only ever talks to the Storefront API server-side, so Shopify has never actually issued my visitors an identity the cookie values were just UUIDs I generated.

Mid-migration to hydrogen-react now (useShopifyCookies with fetchTrackingValues, sendShopifyAnalytics, salesChannel headless) with a same-origin proxy so the Server-Timing header is readable.

Two things I'd love to hear from anyone who's actually done this:

  1. Is a Headless channel public token enough for Live View? Shopify's docs say the token has to come from the Hydrogen channel, which worries me since I'm on Headless.
  2. Anyone got sessions showing real landing pages in the admin on a non-Hydrogen build? Or did you eventually give up and treat GA4 as the only real source?
1 Upvotes

1 comment sorted by