top of page
gtm-and-ga4-for-shopify.webp
London, UK · Serving UK/EU · GBP pricing

Google Tag Manager & Google Analytics 4 setup for Shopify.

Accurate tracking across your Shopify Storefront and Checkout, using Google Tag Manager & Google Analytics 4

If your Shopify GA4 data doesn't match your Shopify admin, or your checkout is a tracking black hole, this is the service that fixes it.

​

Shopify says it integrates with Google Analytics 4 out of the box. This is true in the way a tent is technically a house. Here's what a proper setup involves, and why the native option falls short.

​

Marc is a UK-based Google Tag Manager consultant who will setup Google Tag Manager and Google Analytics 4 (GA4) on Shopify properly: full ecommerce tracking across the storefront and checkout, built on Shopify's Customer Events framework, with a structured dataLayer, Consent Mode v2 included.

​

Book a Free 30-Minute Consultation

Why Shopify's native GA4 integration isn't enough.

Credit where due: the native options have improved. The Google & YouTube app handles GA4 and Google Ads conversion tracking, and Meta and TikTok have their own apps doing the same for their platforms. For a store with a conventional funnel and no awkward questions, they broadly work.

 

The problems start with what you can't do:

​

  • No customisation. Each app sends a fixed set of events, defined by the platform, on the platform's terms. You can't add parameters, fix item data, track interactions the app didn't anticipate, or debug anything when the numbers look wrong.

​

  • No shared source of truth. Each app measures independently, with its own event definitions and its own timing. When GA4, Google Ads and Meta inevitably disagree, there's no common dataLayer to arbitrate: just three apps, three answers, and a meeting.

​

  • A fixed idea of how your store works. The apps assume the classic path: collection page, product page, cart, checkout, purchase. The moment your store deviates from that script, the native events stop describing your actual funnel (more on this below).

​

  • Limited consent visibility. Each app handles Consent Mode v2 its own way, with little transparency and less control, which matters under UK GDPR and PECR.

​

  • No route to server-side. The native apps are client-side only. If server-side tagging is in your future (a Meta Conversions API feed, first-party data control, resilience against browser tracking prevention), there is no upgrade path from the apps: server-side GTM requires a proper GTM foundation first.

​

A Google Tag Manager setup on Shopify solves all five, but only if it's built to handle Shopify's specific quirks. Most GTM-on-Shopify guides stop at pasting the container snippet into theme.liquid. That covers the storefront and abandons you at the exact moment someone gets their card out.

Does Google Tag Manager work in Shopify checkout?

Not by itself, and this is the single most misunderstood thing about Shopify tracking. Since Shopify retired checkout.liquid, custom code (including the GTM snippet in your theme) does not run at checkout.

 

The checkout lives in a sealed sandbox. Any tracking that isn't built for that sandbox goes dark from begin_checkout onwards.

​

The answer is Shopify's Customer Events pixel framework. Marc builds a hybrid architecture:

​

  • Storefront: GTM in the theme, fed by a structured, documented dataLayer, with a bridge from Shopify's analytics pixel so every event carries full product and ecommerce data.

​

  • Checkout: a dedicated Customer Events pixel running inside Shopify's sandbox, capturing begin_checkout, add_shipping_info, add_payment_info and purchase with complete item, revenue, tax and shipping data.

​

  • One consistent schema across both, so GA4 sees a single coherent journey rather than two systems shouting over each other.

 

The sandbox has real limitations (no GTM preview mode, restricted triggers, no DOM access), and building inside it correctly is precisely the kind of work you want done by someone who has already made the mistakes on someone else's clock.

GA4 ecommerce tracking for Shopify, done properly

The full GA4 ecommerce event schema, implemented in snake_case with item data that is actually populated:

​

view_item_list · select_item · view_item · add_to_cart · view_cart · remove_from_cart · begin_checkout · add_shipping_info · add_payment_info · purchase

​

Shopify themes make this harder than it looks. Collection pages with infinite scroll, AJAX filtering and quick-view modals load products without loading pages, so pageview-based tracking misses them entirely.

 

Marc implements list tracking that detects these loads and enriches every event with full product data from Shopify's own metadata, so your merchandising reports include the top of the funnel instead of starting at the till.

​

Item IDs and variants are mapped deliberately against your product catalogue, which is what makes GA4 reconcile with the Shopify admin rather than argue with it.

Custom event tracking for Shopify stores that don't follow the standard funnel

The native integrations all assume your store works one way: collection page, product page, cart, checkout, purchase.

 

Plenty of Shopify stores don't.

Gift builders and product configurators.

 

Quiz-led funnels where the recommendation is the journey. Personalisation flows with steps that matter more than any pageview.

 

Subscription-first stores. Landing pages that skip the catalogue entirely.

 

Stores where the decisive moment happens three steps before anyone sees a checkout.

 

The fixed event sets in the native apps have no vocabulary for any of this. Your most important funnel stages simply don't exist in the data, and no amount of GA4 configuration can report on events that were never sent.

 

A GTM and dataLayer setup can be shaped to your actual journey: custom events for the steps that genuinely matter in your funnel, defined in a written spec, sitting alongside the standard GA4 ecommerce schema. Your reports end up describing your store, not a generic one.

 

Marc has built measurement at both ends of this spectrum: traditional storefronts with a conventional catalogue and checkout, and a completely bespoke ecommerce build for a health company where nothing about the journey was off the shelf, from quiz-led onboarding through to purchase.

 

Wherever your store sits between those two, the approach is the same: map the real journey first, then build tracking that describes it.

Consent Mode v2 for Shopify stores.

A cookie banner that controls your theme's tags but not the checkout pixel is compliance theatre. Marc separates analytics and marketing tracking architecturally and wires both sides of the checkout boundary to Google Consent Mode v2, so a visitor's consent choice actually holds from homepage to order confirmation. A cookie policy describing what your store genuinely sets is included, aligned to UK GDPR and PECR.

Shopify attribution fixes: payment gateways and referrals.

Customers bounce out to PayPal, Klarna or a 3D Secure screen and return, and GA4 starts a new session credited to the payment provider.

 

The fix involves referral exclusions and ignore_referrer applied in exactly the right place, and only there. Applied too broadly (a common DIY mistake), it trades a visible attribution problem for an invisible one.

 

Marc configures this for your specific payment flow and validates it against real orders. For the mechanics behind it, see the guide to cross-domain tracking in GA4.

How the setup works.

  • Discovery. A short call plus access to GA4, GTM and the Shopify admin. Marc maps what currently fires, where, and on whose authority.

​

  • Specification. A written tracking spec covering every event, parameter and trigger, in plain English, agreed before anything is built.

​

  • Build. Storefront dataLayer and GTM container, checkout Customer Events pixel, Consent Mode v2, bot filtering. Built to a documented naming convention the next person can actually read.

​

  • Validation. Real orders traced end to end, GA4 purchase data reconciled against the Shopify admin, residual gaps explained in writing.

​

  • Handover. A walkthrough with your team, plus full documentation. No dependency, no mystery box.

​

Most implementations complete within 2 to 4 weeks depending on access and how many marketing platforms are in scope.

Shopify GA4 and GTM pricing.

  • Shopify Tracking Audit: £300 to £600. A full review of your current setup: what fires, what double-counts, how much of your traffic is actually human, and where the GA4-vs-Shopify revenue gap comes from.

​

It follows the same method as Marc's 38-point GA4 audit, tuned for Shopify. Prioritised findings written for humans, not a 40-page PDF of screenshots.

​

  • Full GTM + GA4 Implementation: £850 to £1,500. The complete hybrid build: storefront GTM and dataLayer, checkout Customer Events pixel, full GA4 ecommerce schema, Consent Mode v2, validation against real orders.

​

  • Audit + Fix: £1,000 to £1,800. The audit, then the fixes, done properly rather than left as homework. Price depends on the state of the existing setup and how many platforms are involved.

​

Marketing platform tags (Meta with CAPI-ready structure, Google Ads, TikTok, Pinterest) and server-side GTM can be added to any tier, quoted based on your stack.

Frequently asked questions.

Can you use Google Tag Manager with Shopify?

​

Yes, and for any store that runs paid media or needs more than basic reporting, you should. GTM on Shopify requires a two-part setup: the container in your theme for the storefront, and a Customer Events pixel for the checkout, because theme code doesn't run there. Done properly, it gives you full control over GA4, Google Ads, Meta and every other platform from one place.

​

Why doesn't my GA4 revenue match Shopify?

​

The most common reason Shopify merchants get in touch. It's usually several causes stacked: checkout tracking gaps, consent-based data loss, refunds handled differently, and bot traffic distorting everything around it.

 

The audit identifies which apply to your store. The two numbers will never match to the penny (they can't, for legitimate reasons Marc will explain), but the gap becomes small, stable and documented.

​

Do I still need the Google & YouTube app if I use GTM?

​

For tracking, no: the GTM and Customer Events setup replaces both its GA4 and its Google Ads conversion tracking, and running both usually means double-counting. Many stores keep the app solely for Merchant Center product feeds, with its tracking switched off.

 

The same logic applies to the Meta and TikTok apps once GTM is handling those platforms. Marc will configure whichever arrangement fits your setup and make sure nothing fires twice.

​

Does this work with Shopify Plus?

 

Yes. Plus stores get the same architecture, with additional attention on checkout extensibility, B2B flows and multi-storefront setups where relevant.

​

What about subscription and upsell apps?

 

Recharge, post-purchase upsells and similar apps each interact with tracking in their own creative ways. They're mapped during discovery and handled in the spec rather than discovered in production.

​

Will Google Tag Manager slow down my Shopify store?

​

No. The storefront build is deliberately lightweight and bot filtering lives in the tag layer rather than in extra scripts. Most stores actually shed page weight during the build, because redundant tracking apps and duplicate pixels get retired.

​

Do I need server-side tracking for Shopify?
​

Not necessarily, and anyone who says every store needs it is selling something. A well-built client-side setup with Consent Mode v2 is the right answer for many stores. Server-side GTM earns its keep when paid spend is significant and platforms like Meta need a Conversions API feed.

​

One thing worth knowing either way: the native Shopify apps offer no route to server-side at all, so if sGTM is anywhere on your roadmap, a proper GTM foundation is the prerequisite, and this setup is that foundation.

​

Marc will tell you honestly which side of the line you're on. If it's server-side you need, see server-side GTM implementation.

​

How long does it take?

​

Audits usually take 1 to 2 weeks from access being granted. Full implementations typically run 2 to 4 weeks.

Additional services for Shopify stores.

The GTM and GA4 setup is the foundation. These build on it:

​

  • Server-Side GTM. First-party tracking through your own tagging server: Meta Conversions API, resilience against browser tracking prevention, and control over exactly what leaves the browser.

​

  • Connect GA4 to BigQuery. Raw, unsampled event data for SQL analysis: join GA4 with Shopify order exports, build custom attribution, and keep data beyond GA4's retention limits.

​

  • Custom GA4 Dashboards. Looker Studio reporting built around your store's actual questions: trading, merchandising and channel views your team will genuinely open on a Monday.

​

  • GA4 to Back Office Integration. Bridge GA4 with your CRM, ERP or subscription platform so marketing data and commercial reality stop living in separate buildings.

​

  • Conversion Tracking. Google Ads, Meta and other platform conversions configured on the same dataLayer, so every platform is fed from one source of truth.

​

  • GA4 Training. Sessions run on your GA4 property and your real store data, so your team can answer their own questions after handover.

Why choose Marc for Shopify analytics

Shopify-specific, not Shopify-adjacent. The Customer Events sandbox, AJAX collection pages, payment gateway attribution and Shopify's particular flavour of bot traffic are treated as first-class problems, because on Shopify they are.

​

The numbers get validated. Every implementation is reconciled against real orders before handover. If GA4 and Shopify disagree, you'll know why, in writing, before anyone builds a report on it.

​

Independent, senior expertise. No agency overhead, no junior learning on your store. You work directly with Marc: the person doing the implementation, the testing and the explanation.

​

Based in London, works UK-wide and internationally. Most Shopify work is delivered entirely remotely, with video calls at key milestones.

 

Stop deciding which of your dashboards to believe.

​

Book Your Free 30-Minute Consultation

​

He'll be honest if the existing setup is salvageable or if starting fresh makes more sense.

bottom of page