AuditTag

Shopify tracking: how pixels, customer events and checkout actually work

By Sam ParkinsonUpdated 18 September 202610 min read

The short answer: on Shopify, the storefront and the checkout are tracked differently. Theme code covers product and collection pages; the checkout, where the purchase happens, is tracked through Shopify's customer events, using app pixels (installed by sales channel apps) or custom pixels you write.

Most broken Shopify tracking comes from mixing the two: tracking added to the theme that never sees a purchase, or the same platform installed through both routes and counting twice.

Shopify has changed how tracking works more than once, and much of the advice online still describes the old way. Here is how it works now, where it goes wrong, and how to check your store.

The three ways tracking gets onto a Shopify store

RouteExamplesTracks checkout?
Sales channel / app pixelsGoogle & YouTube, Facebook & Instagram, TikTokYes, via customer events
Custom pixelsYour own code under Settings › Customer eventsYes, via customer events
Theme codeSnippets in theme.liquid, GTM in the themeNo, storefront pages only

Shopify has retired checkout.liquid and the old "Additional scripts" box on the Thank you and Order status pages as stores moved to checkout extensibility. Tracking that used to live there has to move to customer events, and stores that never made the move can have purchase tracking that quietly stopped.

How customer events work

Shopify publishes standard events as a shopper moves through the store and checkout, including page_viewed, product_viewed, product_added_to_cart, checkout_started, payment_info_submitted and checkout_completed. A pixel subscribes to the ones it needs:

analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  // send a GA4 purchase / Meta Purchase using
  // checkout.order.id, checkout.totalPrice.amount, checkout.currencyCode,
  // checkout.lineItems ...
});

Two consequences matter for auditing:

What's actually on your store's pages? AuditTag reads your public Shopify pages and reports the GA4, Tag Manager, Google Ads and Meta tags it can detect. Run a free audit →

The four Shopify tracking failures we see most

1. Purchase tracked from the theme

GA4 or a pixel added to theme.liquid records page views and add-to-carts, then nothing at the finish line, because the theme does not run in checkout. Symptom: events up to begin_checkout, no purchase. Detail and fix: GA4 purchase event not firing on Shopify.

2. The same platform installed twice

The Google & YouTube channel plus GA4 through Tag Manager, or the Facebook & Instagram channel plus an old hardcoded pixel. Shopify itself warns that combining its Google integration with a Tag Manager GA4 setup can duplicate tracking. Symptom: platforms report more purchases than the store took.

3. A custom pixel with an incomplete payload

A hand-written custom pixel sends the purchase but maps the fields wrongly: the total as a string, the currency missing, line items not mapped to items. Symptom: purchases counted, revenue £0 or product reports empty.

4. Consent settings that block more than intended

A pixel that declares it needs marketing consent never runs for shoppers who ignore the banner. That may be exactly what you want, but it should be a decision, not a surprise.

How to audit tracking on a Shopify store

  1. List the routes. Check Settings › Customer events for app pixels and custom pixels, the sales channels you have connected, and your theme code for hardcoded tags.
  2. One route per platform. For each of GA4, Google Ads and Meta, confirm exactly one install.
  3. Test purchase. Place a real low-value order with GA4 DebugView and Meta Test events open. Confirm one purchase each, with value, currency and order ID. Refund it.
  4. Consent. Repeat in a private window without accepting the banner.
  5. Reconcile. Compare a closed week of orders in Shopify admin with each platform. See the full tracking audit checklist.
  6. Re-test after changes. Theme updates, app installs and checkout changes are when Shopify tracking breaks. See tracking monitoring.

How AuditTag handles it

What AuditTag checks

  • GA4, Tag Manager, Google Ads, Meta Pixel and leftover Universal Analytics detectable in your storefront's served pages
  • Stores with analytics but no advertising conversion pixel
  • Never touches your store: no app, no login, no access to your admin

What this doesn't prove

Pixels installed through Shopify's customer events load in a sandbox and may not appear in served HTML, so a "not detected" result on Shopify means check Customer events, not you have none. AuditTag cannot see inside checkout, so a test order is still the proof the purchase fires.

See what your Shopify storefront is running

The free audit reads your public Shopify pages and reports the tracking it can detect, plus the gaps, in about a minute. No app to install, no login, nothing touches your store.

Run a free audit →

Questions people ask

How do I add tracking to Shopify checkout?

Through Shopify's customer events system rather than theme code. Either connect a platform's sales channel app (such as Google & YouTube or Facebook & Instagram), which installs an app pixel, or add a custom pixel under Settings, Customer events that subscribes to checkout_completed and sends the purchase to your platform. Theme code does not run in Shopify's checkout.

Why can't I see my Shopify pixel in the page source?

Pixels installed through customer events (app pixels and custom pixels) are loaded by Shopify's pixel system in a sandbox, not written into your theme's HTML. They will not appear as a normal snippet in view-source, so check them in the browser's Network tab, in the platform's own debugging tool, or in Shopify's customer events settings.

Why is my Shopify purchase tracked twice?

Usually because the same platform is installed two ways: for example the Google & YouTube channel plus GA4 in Google Tag Manager, or the Facebook & Instagram channel plus a pixel still hardcoded in the theme. Pick one route per platform and remove the other.

Can a Shopify custom pixel access my theme's dataLayer?

No. Custom pixels run in a sandbox, separate from the storefront page, so they cannot read the theme's window.dataLayer or its DOM. They receive data from Shopify's customer events instead. If you run Google Tag Manager inside a custom pixel, it gets its own dataLayer that you populate from those events.

More tracking guides