Sales traceable to their source
6% to 76%
- Before
- 6% (39 of 612 sales in 29 days)
- After
- 76% (settled-day reading, 19 Aug 2026)
Automotive repairClient work
How a headless US Shopify retailer won back source attribution, cut duplicate purchases to zero and finally subtracted refunds.
The brief
A US automotive-repair retailer sells parts through a headless Shopify setup: the storefront is a Next.js app on its own domain, while checkout runs on Shopify’s separate domain. It advertises on Google, and it needed measurement it could trust.
I was brought in in July 2026 to rebuild the measurement end to end before Shopify retired the mechanism its checkout tracking depended on. The new purchase tracking went live on 10 August, sixteen days before the 26 August cutoff; the storefront half was merged and deployed on 18 August.
Client details anonymised. Figures read from live platform APIs in August 2026.
Sounds familiar?
The investigation
I audited the web and server Tag Manager containers through the live API, so the exported configuration matched production with no drift, then confirmed each finding by capturing the real network requests leaving a live checkout and storefront.
Two root causes carried the damage.
One rule inside the client’s own server container was dropping every purchase that carried a session and a source before it reached analytics. What did get through came from Shopify’s Google app, sent blind, with no session attached — which is exactly the pattern the reports showed.
The checkout was using Shopify’s internal visitor token rather than Google’s client id. Every checkout event was therefore attached to a different user than the storefront visit that produced it, so a sale and its source could never be joined. On a headless store this is the fundamental fault: the sale and the visit that produced it are recorded as two unrelated strangers.
The audit also found: a rule that silently discarded orders above a hard value threshold; HubSpot loading twice on every page; fourteen dead Universal Analytics tags; and a Meta access token issued by a third-party app that neither side could rotate.
After delivery, checking a flattering claim, I found automated traffic — about 100,120 sessions from one country over twelve months, roughly a sixth of everything the property recorded, six seconds each, one page each, zero sales and zero leads. It had been running since August 2025. I told the client with no charge.
Handover
Delivery noteDelivered Aug 2026
Before → after
Client work Done for real clients. Client details are anonymised.
Sales traceable to their source
6% to 76%
Duplicate purchase reporting
+100% to 0%
Sales credited to a Google ad, per day
0.1 to 10.5
Refunds subtracted from reported revenue
Event types measured
6 to 13
| What changed | Before | After | Read on |
|---|---|---|---|
| Sales traceable to their source | 6% (39 of 612) | 76% | settled days, Aug 2026 |
| Sales invisible to every report | 573 of 612, in 29 days | 24% still without a source (the complement of the 76% reading) | Aug 2026 |
| Duplicate purchase reporting | +100% | 0% | from 15 Aug 2026 |
| Sales credited to a Google ad, per day | 0.1 | 10.5 | Aug 2026 |
| Refunds subtracted | none, ever | every refund | from 15 Aug 2026 |
| Event types measured | 6 | 13 | Aug 2026 |
...rebuilt Meta tracking for my funnel with browser + server deduplication, set up the tracking Worker to run on my own Cloudfare account (for full ownership)...
Notes on the numbers
The duplication stopped mid-morning on 14 August and did not return: read hour by hour from the property, eight consecutive hours showed exactly one purchase event per order after the change, against +100% for the preceding days. The whole-day ratio was back to zero on every day from 15 August.
Reading these numbers honestly: the post-fix share is a settled-day figure, and the first days after a fix are noisy. On 19 August it read 76%, and the same measure ranged 73–83% that week and sat higher once the month settled.
I also disclosed, unprompted, six synthetic refund records that had briefly reached the live property while the refund path was being built, and had them removed by the synthetic visitor identity they were sent under.
A note from Daniilbefore you decide
If your storefront and your checkout are on different domains and nothing carries the visitor across the hop, your ad platforms learn from the fraction of sales they happen to see. Their budgets follow that fraction. The fix is not a better dashboard; it is identity that survives the hop and refuses to be invented.
Two numbers change what the platforms actually learn: the share of sales carrying a real source, and refunds. Most stacks never subtract refunds, so every bid is set against revenue that has already come back.
And a fix nobody can see is not a delivery. A live report, a monitor and plain documentation are part of the work, not extras.
— Daniil
How a UK marketplace cut Google Ads from about 2.9 conversions per real submission to one event per action, reconciled against its own records.
The first answer is free, within one working day. Or write directly: next@taskfordaniel.com