Shopify and GA4 don't play well together by default. Shopify's native GA4 integration captures basic page views and a watered-down version of enhanced ecommerce, but anyone who's tried to debug attribution or build cohort analysis off it knows the gaps. This guide walks through the implementation we use on every Shopify store, from basic setup through to server-side tracking and conversion modelling.
Why default GA4 on Shopify is broken
Shopify's default GA4 integration has three significant limitations:
- Checkout events are unreliable. The "begin_checkout", "add_shipping_info", and "add_payment_info" events fire inconsistently — particularly on Shopify Plus checkout extensions or accelerated checkouts (Shop Pay, Apple Pay).
- Cross-domain tracking is broken when checkout is on
checkout.shopify.comrather than your domain. Users get attributed as new sessions when they hit checkout, breaking funnel analysis. - No server-side option natively. Everything fires client-side, which means iOS users with ITP, ad blockers, or aggressive cookie restrictions vanish from your data — typically 15-25% of traffic.
You can work around all three, but you have to actually do the work — it doesn't happen by default.
The basic setup (and why it's not enough)
The minimum viable GA4 setup on Shopify:
- Create GA4 property, get Measurement ID (G-XXXXXXXX)
- Shopify Admin → Online Store → Preferences → paste Measurement ID into Google Analytics field
- Verify events firing in GA4 → Reports → Realtime
This captures page views, basic events, and Shopify's built-in ecommerce events. It's fine for showing your boss a chart, but it's not fine if you actually need to make decisions from the data.
The right setup involves Google Tag Manager and (for serious operations) GTM Server-side. Walk-through below.
Enhanced ecommerce events
The core ecommerce events GA4 needs:
| Event | When it fires | Critical for |
|---|---|---|
| view_item_list | Collection/category page load | Product discovery analysis |
| select_item | Product card click | Collection page CRO |
| view_item | Product detail page load | PDP conversion analysis |
| add_to_cart | Add to cart action | Funnel analysis |
| view_cart | Cart page view | Cart abandonment |
| begin_checkout | Checkout initiation | Checkout funnel |
| add_shipping_info | Shipping info entered | Step-by-step funnel |
| add_payment_info | Payment method selected | Step-by-step funnel |
| purchase | Order completion | Everything |
Shopify fires most of these automatically when you enable enhanced ecommerce, but with edge cases. The fix is to fire them yourself via GTM with proper data layer pushes.
Where Shopify falls short specifically
- view_item_list and select_item aren't fired by default — you have to add custom JS to your theme
- add_to_cart fires reliably from main product pages but not from ajax/popup carts
- begin_checkout fires on the first checkout step but the multi-step funnel events are missing on standard Shopify
Server-side tracking via GTM Server
This is where the real wins are. Without server-side, you're losing 15-25% of conversions to client-side blocking. With server-side, you recover most of them and improve attribution accuracy.
How GTM Server works
Instead of GA4 events firing from the user's browser directly to Google, events fire to your own server (a tagging server you run on Google Cloud), which then forwards to GA4. From the user's browser, this looks like calls to your own domain — bypassing ad blockers and ITP.
What you need
- Google Cloud account (the server runs on Cloud Run, ~£15-30/month for normal traffic)
- A subdomain pointed at it (e.g.,
tag.yourbrand.com) - GTM Web container set up to send to the GTM Server container
- The Server container forwards to GA4, Meta Conversions API, Google Ads, etc.
It takes a developer 4-8 hours to set up properly. Worth every minute — typically recovers 15-25% of "lost" conversions in attribution.
Once you have GTM Server, you can also use it for Meta's Conversions API, Google Enhanced Conversions, TikTok Events API, and other server-side endpoints. One infrastructure investment unlocks better data on every paid channel.
Custom dimensions and conversions
Default GA4 reports are generic. Make GA4 useful by adding custom dimensions that match how you actually run the business.
Custom dimensions we set up by default
- customer_type — new vs repeat, set on every event
- customer_tier — VIP / regular / new (based on LTV thresholds)
- discount_used — boolean, did this order use a discount code
- discount_code — which code specifically
- shipping_method — standard / express / collection
- payment_method — card / Shop Pay / PayPal / Apple Pay
- marketing_consent — did they opt in to email at checkout
Conversions to mark
By default only "purchase" is a conversion. Also mark as conversions:
- add_to_cart (high-intent signal for retargeting)
- begin_checkout (final-funnel signal)
- newsletter_signup (custom event you fire when someone subscribes)
- account_created (acquisition signal)
GA4 audit — free
Send us a sample of your GA4 property. We'll audit event firing and identify what's missing or broken.
Request audit →Conversion modelling and attribution
GA4 uses data-driven attribution by default (Google's machine learning model). For most accounts this is fine — but you need to verify your data quality is good enough for the model to work.
Conditions for trustworthy attribution
- Minimum 300 conversions per month per channel (GA4's minimum threshold)
- Consent mode v2 implemented (for cookie-blocked users to be modelled correctly)
- Server-side tracking handling iOS/ITP losses
- UTM parameters consistent across all paid channels
Without these conditions, GA4's attribution model falls back to "last click" effectively, even though it claims to be data-driven.
How to debug what's broken
Tool 1: GA4 DebugView
Real-time event firing visible to authorised debuggers. Add ?gtm_debug=1 to any URL and your session appears in DebugView. Useful for verifying events fire correctly on staging.
Tool 2: Google Tag Assistant (Chrome extension)
See every tag firing on the current page, including parameters and timing. Critical for debugging Shopify's checkout pages.
Tool 3: GA4 → Admin → Data Quality
GA4 now has a built-in data quality dashboard showing issues with event parameter format, missing required parameters, and other red flags. Check this monthly.
Common issues we see
- Currency mismatch — purchase events without currency parameter, or with inconsistent currency codes. GA4 silently drops the revenue value if currency is missing.
- Duplicate transactions — purchase event firing twice (once from the page, once from server-side). Set up dedup logic in GTM Server.
- Missing item parameters — purchase events without item-level breakdown. Affects product-level revenue reports.
"GA4 isn't broken. Default Shopify-to-GA4 setups are broken. The fix is engineering, not magic."
Need this set up properly?
We do full GA4 implementations including GTM Server-side. Typical setup takes 1-2 weeks.
Book a free call →