All guides
Setup

Shopify Customer events and custom pixels: tracking after the checkout upgrade

Updated November 22, 2026

Shopify has retired checkout.liquid and the Additional scripts box on the Thank you and Order status pages. Tracking in checkout now runs through web pixels, managed under Settings → Customer events.

If your purchase tracking used to live in Additional scripts, it needs a new home. Here's how the pieces fit together.

App pixels and custom pixels

  • App pixels are installed by apps (Google & YouTube, Facebook & Instagram, TikTok, tracking apps). You don't edit their code; you manage them in the app.
  • Custom pixels are code you paste into Settings → Customer events → Add custom pixel. They are often used for platforms without an app, or to load a Google Tag Manager container.

Both subscribe to the same standard events, such as page_viewed, product_added_to_cart, checkout_started and checkout_completed.

The sandbox: what changes for your scripts

Pixels run in a sandbox, separate from the page. That's what lets Shopify run them safely in checkout, but it means older scripts often don't work as they are:

  • Scripts can't read or change the page directly, so code that scraped prices from the page or listened for button clicks needs to use the event data instead.
  • Data comes from the event, for example event.data.checkout for purchases, including order ID, totals, currency, line items and customer details.
  • Google Tag Manager can run inside a custom pixel, but triggers based on clicks or page elements don't work. Push the Shopify events into the dataLayer and trigger tags from those.
  • Pixels respect the visitor's consent from Shopify's Customer Privacy settings, depending on the permission you choose for each pixel.

Moving from Additional scripts

  1. List what your Additional scripts box contained: usually Google Ads conversion tags, Meta or TikTok purchase code, affiliate pixels and survey tools.
  2. For each one, check whether an app pixel already sends it (for example the Google & YouTube app). Don't add a custom pixel for something an app already sends, or you'll create duplicates.
  3. Move the rest into one custom pixel per platform, using checkout_completed for purchases.
  4. Place a test order and check each platform's test tools to confirm one purchase arrives.

Common mistakes

  • Adding a custom pixel for Meta or GA4 while the official app still sends the same events.
  • Copying old code that relies on the page (document, window.location of the thank-you page) without changing it to use event data.
  • Forgetting to send the order ID with purchases, which platforms need to deduplicate.
  • Leaving several custom pixels that load the same GTM container.

Where TrakIt fits

TrakIt installs its own app pixel and sends purchases from your Shopify orders on the server, so you don't need custom pixel code for the platforms it supports. If you prefer GTM, TrakIt can also load your own GTM container for you.

Questions

Where did Additional scripts go?

Shopify replaced it with Customer events. Tracking code now runs as an app pixel or a custom pixel under Settings → Customer events.

Can I use Google Tag Manager on Shopify checkout?

Yes, inside a custom pixel or through an app that loads it. Tags must be triggered from Shopify's events, because the sandbox can't see page clicks or elements.

Why doesn't my custom pixel fire in Preview?

Custom pixels don't run in the theme editor preview. Test on the live storefront and with a real (or test-mode) checkout.