← All projects Ecommerce · GA4 · GTM

Rebuilding GA4 ecommerce tracking after a Shopify Plus migration

Purchase and add-to-cart events had stopped firing after a theme migration, leaving 18% of revenue untracked. I rebuilt the dataLayer and GA4 ecommerce events end to end, validated every stage in DebugView, and reconciled GA4 against Shopify to the dollar.

ClientDTC apparel brand
PlatformShopify
Timeline2 weeks
ToolsGA4, GTM, BigQuery

A fast-growing DTC apparel brand had just replatformed to Shopify. The redesign looked great — but underneath it, GA4 had quietly stopped tracking almost a fifth of every order, and the marketing team was making budget decisions on numbers that were already wrong.

The problem

After migrating from a legacy platform to Shopify, the client’s GA4 purchase event stopped firing for roughly 1 in 5 orders. Nobody noticed until a finance review flagged a gap between Shopify’s reported revenue and what GA4 was showing — by then, six weeks of data was already unreliable.

What I did

  • Audited the existing GTM container and mapped every ecommerce event against Shopify’s checkout flow
  • Found the purchase event was firing on page load instead of on confirmed order status, causing silent duplicate/missed fires
  • Rebuilt the dataLayer implementation using Shopify’s checkout webhooks via a lightweight server-side endpoint
  • Set up a BigQuery export to cross-check GA4 revenue against Shopify orders daily

The result

18%revenue recovered into reporting
99.6%match rate vs. Shopify orders
2 wksfrom audit to validated fix
In the client’s words

“We’d been optimising ad spend against numbers that were 18% wrong and didn’t even know it. Now GA4 matches Shopify to the dollar.” — Head of Growth

Got a project like this?

Tell me what's going on, or grab time on my calendar.