GA4 & Tracking

Shopify Customer Events vs Google Tag Manager: How to Track Shopify in 2026

Shopify moved checkout tracking into sandboxed pixels. Here is how Customer Events and GTM fit together, and the setup I use for reliable purchase tracking.

Quick answer

Shopify Customer Events is where pixels now run, including at checkout. App pixels run in a strict sandbox and custom pixels run in a looser iframe sandbox. Google Tag Manager can still be used, but on checkout it has to run inside a custom pixel and receive Shopify's events through it. For most stores the best setup is GTM on the storefront plus a custom pixel that forwards checkout events, ideally to a server-side container.

Key takeaways
  • checkout.liquid and Additional Scripts no longer work for checkout tracking; Customer Events replaced them.
  • App pixels run in a strict sandbox; custom pixels run in a lax iframe sandbox and cannot access the main page.
  • GTM can run inside a custom pixel, but it needs its own data layer built from Shopify's events.
  • Native channel apps are quick but give little control over events, IDs and deduplication.
  • Server-side tracking makes Shopify purchase data more reliable whichever pixel method you use.

If you track a Shopify store, you have probably seen the message that Additional Scripts and checkout.liquid are gone. Checkout tracking now runs through Customer Events, Shopify's pixel system. That raises a common question: should you use Customer Events, Google Tag Manager, or both? This guide explains how they fit together and the setup I use on client stores.

What are Shopify Customer Events?

Customer Events is the section in Shopify admin → Settings → Customer events where tracking pixels run. Shopify publishes standard events such as page_viewed, product_viewed, product_added_to_cart, checkout_started and checkout_completed, and pixels subscribe to them.

There are two kinds of pixels:

  • App pixels come from apps like the Google & YouTube channel or the Facebook & Instagram channel. Shopify loads them in a strict sandbox that runs in a web worker.
  • Custom pixels are code you paste in yourself. Shopify loads them in a lax sandbox, an iframe that can run scripts but cannot access the main page.

The key point: on the checkout and thank-you pages, your theme code and normal GTM container do not run. Only Customer Events pixels do.

Where Google Tag Manager fits

GTM still works on Shopify, but in two different places:

  1. Storefront (theme). GTM installed in the theme runs on home, collection, product and cart pages, like on any website.
  2. Checkout (custom pixel). To track checkout steps and purchases with GTM, you load a GTM container inside a custom pixel and push Shopify's events into its data layer.

Because the custom pixel is sandboxed, a few things behave differently:

  • The pixel cannot read the main page, so all data must come from Shopify's event payload.
  • Normal GTM Preview does not connect inside the sandbox, so checkout testing uses the browser console, the pixel's own debug output or the server container's Preview.
  • Field names must match exactly. If the pixel sends transactionId but your GTM variable reads transaction_id, the tag silently sends nothing.

Native apps vs custom setup

Native channel apps Custom pixel + GTM
Setup time Minutes A few hours
Control over events and parameters Low Full
Extra destinations (TikTok, Pinterest, etc.) One app per platform One container for all
Deduplication with server events Handled inside each app You control the event IDs
Server-side GTM Not used Easy to add
Best for New stores, small budgets Stores spending seriously on ads

The most common problem I find in audits is both running at once: the native Facebook app sends Purchase, and a custom pixel or server tool sends it again. Run your store through the free Tracking Checker and check Customer Events to see everything that is active. Keep in mind the checker only sees the page source, so app pixels inside Customer Events must be checked in Shopify admin.

The setup I recommend

For stores running Google Ads or Meta ads, this setup gives reliable data:

  1. GTM on the storefront for page views, product views and add-to-cart, with a clean data layer.
  2. One custom pixel that listens to Shopify checkout events and forwards them to GTM with the same field names.
  3. A server-side GTM container (for example on Stape) that receives the events and sends them to GA4, Google Ads and Meta Conversions API with deduplication. See Shopify server-side tracking.
  4. Native channel apps kept only for catalogue sync, with their own tracking turned off, so purchases are not counted twice.
  5. A test purchase and a 7-day comparison of GA4, Google Ads and Meta against real Shopify orders.

You can see real Shopify tracking projects, such as Oxygen Concentrator Depot in the USA and Modalclo in Bangladesh, in my case studies.

Quick checklist

  • No tracking code left in old Additional Scripts or the theme's checkout files
  • Only one source sends each purchase to each platform
  • Purchase events include value, currency, items and order ID
  • Browser and server events share an event ID
  • Consent is respected before marketing pixels fire

If you are comparing tools for this, read Stape vs Elevar vs Analyzify, or see my Shopify conversion tracking service.

Related
Chamok Mahonto
Written by Chamok Mahonto

I'm a conversion tracking & google ads specialist from Rangpur, Bangladesh. I set up GA4, GTM, server-side tracking and Meta Conversion API, and manage Google Ads for businesses worldwide. More about me

FAQ

Frequently asked questions

Can I still put GTM in my Shopify theme?

Yes, on storefront pages such as product and collection pages. But the checkout and thank-you page no longer run theme code, so purchase tracking must come from Customer Events.

Is the native Google & YouTube or Facebook app enough?

For a small store just starting, it can be. For stores spending seriously on ads, the native apps give little control over parameters, deduplication and extra destinations, so a custom setup usually performs better.

Why does GTM Preview not work on Shopify checkout?

Because the pixel runs inside a sandbox iframe, the normal Preview connection does not reach it. You test checkout events with the pixel's own debugging, browser console logs or server container Preview instead.

Do custom pixels slow down my store?

They load in a sandbox, separate from the main page, so the impact on page speed is usually small. Keep the code lean and avoid loading the same tag several times.

Case studies

See it in a real project

Completed Jan 2026Meta Pixel & CAPI+ Google Ads Tracking

Oxygen Concentrator Depot

Consent-aware hybrid tracking for a US Shopify store selling oxygen concentrators: deduplicated Meta browser and server events, GA4 checkout events and Google Ads conversions through server-side GTM.

  • Shopify
  • Meta Pixel
  • Conversions API
Read case study
Completed Jul 2026Meta Pixel & CAPI

Modalclo

Deduplicated Pixel + Conversions API and GA4 enhanced ecommerce for a Shopify loungewear brand, recovering purchases lost to iOS restrictions and ad blockers.

  • Shopify
  • Meta Pixel
  • Conversions API
Read case study
Keep reading

Related articles

GA4 & Tracking

How to Set Up BigCommerce Tracking for GA4, Google Ads and Meta

BigCommerce offers native integrations and Script Manager. Here is how to combine them without double-counting purchases in GA4, Google Ads and Meta.

4 min read · November 2, 2026
GA4 & Tracking

Consent Mode v2 with Server-Side GTM and Meta CAPI: How It Works

Server-side tracking does not remove the need for consent. Here is how consent signals reach your server container and how to make every server tag respect them.

4 min read · November 2, 2026
GA4 & Tracking

Consent Mode v2 Explained: What Small Businesses Must Do

A plain-English guide to Google Consent Mode v2: the four signals, basic vs advanced mode, who needs it, and how to set it up and test it in GTM.

6 min read · October 30, 2026

Ready to fix your tracking and scale your ads?

Get a free audit of your tracking and ad account. Usually replies within 1–2 hours.