The problem
2,300 stores. Most journeys start online; most sales close in a store. Our channel reporting was web-only last-click, so it graded marketing on the fifth of revenue it could see and filed the rest under Direct. By that math the whole paid portfolio lost money. Nobody believed it. Nobody could prove it wrong, either.
The build
Three of us: a tagging expert, a developer, and me on architecture and pipelines.
- Stitch identity across devices and sessions. Assemble orders from three overlapping sources so one broken tag cannot silently drop sales.
- Trace the journey. 30-day lookback per buyer, credit by tiered last-touch across 16 channels. Paid beats earned beats fallback, so a bookmark visit cannot steal the sale from the ad that started it.
- Calibrate to the ERP so every credited dollar foots to finance. Publish the stitch rates on the dashboard: high 80s for ecommerce, high teens for stores, and 45% of store orders carry no digital identity at all. Those get credited to nobody.
- Run holdouts, channel by channel. Matched markets go dark on one channel for a few weeks; the sales gap says how much of the attributed revenue the ads actually caused.
What it showed
Three verdicts on the same week of spend:
What changed
Budgets reallocate on the incremental numbers now. Every other dashboard's money rows must foot to this pipeline to the dollar, because executives add reports together and a mismatch kills trust in both. Ecommerce credit reads next morning; store credit waits out the match window instead of reporting early and wrong.
Two bugs worth mentioning. A model in the stack labeled "Shapley" was not Shapley; its coalition math was broken, so I rebuilt it, then relabeled it honestly instead of shipping the name. And a converter rule requiring a payment pageview was dropping every order paid through a wallet redirect. Fixing it lifted order capture from about 70% to 95%.
Technical notes, for the people who will ask
Identity. Visitor IDs extracted from the behavioral stream, linked across devices, with hashed-email and analytics-ID edges added by co-occurrence. Guards: identities shared across several distinct emails are dropped; bot networks filtered. Orders come from three sources unioned, because each covers the others' failure modes.
Credit rules. 30-day lookback at or before the order timestamp. Tiered last-touch: paid, then earned, then fallback; last touch in the highest tier wins. Converters with no attributable touch redistribute proportionally instead of inflating Direct, which browser privacy already inflates.
Calibration. Stitched proportions scale to ERP totals per order channel. A year-over-year stitch-improvement correction keeps better stitching from masquerading as growth. Provisional days are flagged, not passed off as final.
Incrementality. Rotating matched-market holdouts, one channel at a time: comparable markets go dark for several weeks, matches keep spending, and the sales gap yields the per-channel factor applied to attributed returns. Sanity checks: a second attribution model agrees on awareness share to within tenths of a point, and a third-party affiliate network agrees on about 70% of contested converters.
The other case studies: the organic decline, the mart, and the dashboard suite. Or back to all work.