Skip to content

Tracking & attribution engineeringClient work

Headless Store, Sales With No Source: Web + Server GTM Rebuild With Consent and Refunds

A web + server GTM rebuild for headless Shopify: identity that survives the storefront-to-checkout hop, dedup, refunds and US opt-out consent.

For
Headless Shopify brands
Checked

Sounds familiar?

Tick what applies to you

The situation Tracking & attribution engineering
Why do my Shopify sales show no source when the storefront is headless?

Tick the lines that describe your case.

Describe my task

How I solve it

What I build

I build measurement that survives the storefront-to-checkout hop on a headless store: the Google client id and the ad click id are carried onto the Shopify order, one producer reports each purchase, a server-side leg sends the events from a stable source, refunds are fetched and subtracted, and US opt-out consent (Global Privacy Control and a reachable opt-out link) is wired without a cookie wall. On a headless build, that identity bridge is the whole job — without it a sale and the visit that produced it are two unrelated strangers.

The process

How it works

6 steps. Scope and a fixed price are agreed before the first one.

  1. Audit the containers through the live API

    Export equals production, with no drift, before anything is touched.

  2. Bridge identity

    The Google client id and the ad click id are written onto the order as cart attributes, and a checkout-side custom pixel reports with session context.

  3. One producer per destination

    The old page-based purchase tags are retired and the duplicate producer is switched off, so two systems cannot report the same sale.

  4. Build the server leg

    GA4 Measurement Protocol with a server-set first-party cookie, Meta CAPI and Bing, each with confirmed before/after evidence.

  5. Subtract refunds

    Successful refunds are fetched from Shopify on a schedule and sent to analytics, recorded so none can be sent twice.

  6. Consent, then watch

    A US opt-out package (GPC honoured before any tag loads, an opt-out link, no cookie wall) and a live report plus a daily monitor.

Handover

What you get

  • Identity that survives the hop: the sale can be joined back to the click that produced it.
  • One purchase event per order, not a duplicate pair from two owners.
  • Refunds subtracted from GA4 and the ad platforms, so bidding learns from net revenue.
  • US opt-out consent with no cookie wall — a paste-ready package for your developer.
  • A live report and a daily monitor, so a break is visible the day it starts.
  • A change record and a rollback for every live change.

Built with

  • GTM web and server
  • GA4 Measurement Protocol
  • Google Ads
  • Meta CAPI
  • Microsoft Ads (Bing)
  • Shopify Customer Events and custom pixel
  • headless Shopify (Next.js)
  • Cloudflare Workers

Proof

Done before, with dates and numbers

Client work Done for real clients. Client details are anonymised.

Before → after

In the 29 days before the rebuild, 612 sales reached analytics and only 39 carried any session source at all — 6%. After the identity bridge and the new server leg, traceability read 76% on the settled-day reading of 2026-08-19; duplicate purchase reporting went from +100% to 0%, and refunds were subtracted for the first time.

  • Fixel Pixel

    production

    the server-side pipeline this rebuild can hand off to: one event mapping, a delivery receipt per event, and detectors for a dead connection, a dark store and a stalled delivery.

Rated 5 out of 5 on Upwork.

Super efficient and knowledgeable. He is one of the most thorough people I have ever hired in UpWork. His documentation is excellent.

Eduardo Y., ClickMinded Upwork · 2017

What you can look at

A redrawn diagram of storefront → checkout → identity bridge → server leg → refunds, with a redacted excerpt of a before/after event table. The diagram and table are rebuilt on synthetic data for this page; the figures below are live reads.

Client details anonymised. Figures read from live platform APIs in August 2026. I am the founder of Fixel Pixel, the server-side pipeline named here as one option.

Price and timeline

What it costs and how it runs

A rebuild like this is scoped and quoted in writing as a Custom Engineering Project, from USD 1,500. If the cause or scope is not clear yet, the honest first step is a read-only Tracking Health Check (USD 395) or a Working Session (USD 195) on one question. A smaller, bounded piece can start at the Focused Fix minimum of USD 450. In the dated case the build was timed to beat a platform deadline: the new purchase leg went live on 2026-08-10, sixteen days before Shopify’s 2026-08-26 cutoff.

QuoteFixed before work starts

Price
Custom Engineering Project from USD 1,500, quoted by agreed scope. If the cause or scope is not yet clear, start with a Tracking Health Check (USD 395) or a Working Session (USD 195); a smaller bounded piece can be a Focused Fix from USD 450.
Timeline
Scoped and quoted in writing before the build. In the dated case the new purchase leg went live on 2026-08-10, sixteen days before Shopify's 2026-08-26 checkout-scripts cutoff.
First step
Describe the task. I reply within one working day, free, and tell you which option fits — or that you can fix it yourself.
Describe a task like this

A note from Daniilbefore you decide

When you don’t need this

If your storefront and checkout already share one visitor identity and your refunds are already net, a rebuild adds work you don’t need — I’ll say so. And if the gap is only attribution modelling (view-through and different attribution windows), no capture fix will move it; a reconciliation will show you that instead.

— Daniil

Questions

What people ask about this

My storefront is headless with a custom checkout. Can this still work?

Yes. The identity bridge runs through a checkout-side custom pixel and the Shopify order, so it does not depend on the theme or the native checkout scripts.

Do you need to rewrite my theme?

No. The storefront half is handed to your developer as a paste-ready patch package; the rest runs through supported paths.

Can you subtract refunds without a webhook?

Yes. Successful refunds are fetched from Shopify on a schedule and sent to analytics, checked against Google's validation service and recorded so none is sent twice.

What consent model is right for a US store?

Opt-out, not opt-in: GPC honoured before any tag loads and an opt-out link, with no cookie wall. This is technical implementation, not legal advice.

How is this different from another dashboard?

A dashboard is a view. This is identity and delivery: the same sale carries its source across the hop and reaches each platform once.

Daniil Maximkin

Hi, I’m Daniil.

I work with you from defining the problem to implementation and handover. You talk to the person who does the work. I work in English and Russian.

Have a task like this?

Describe your task

The first answer is free, within one working day. Or write directly: next@taskfordaniel.com