Skip to content

Google AdsPublished 11 min read

Shopify Conversion Tracking After Checkout Extensibility

How GA4, Google Ads and Meta tracking works on Shopify now: customer events, app pixels, custom pixels, the sandbox, consent and where duplicates come from.

Muhammad Qitmeer, founder of Augere Labs
Muhammad Qitmeer
Co-founder and CEO, Augere Labs
Share

On Shopify today, purchase tracking runs through customer events, not theme code or checkout scripts. Apps such as Google & YouTube and Facebook & Instagram install app pixels, and anything else you need goes in a custom pixel under Settings > Customer events. Both run in a sandbox, so GTM still works but with limits. Most broken or doubled Shopify numbers come from running an app pixel, a custom pixel and old theme code for the same platform at once. The fix is one source per platform, consent wired through Shopify's customer privacy settings, and a real test order checked in each platform.

This guide is for agency teams who inherit Shopify stores and need GA4, Google Ads and Meta purchases to match the orders in Shopify admin. It covers how the current system works, the decisions you have to make, and where we see agencies go wrong.

What changed: the end of checkout scripts

For years, Shopify tracking meant a mix of three places: tags in theme.liquid, a GTM container in the theme, and conversion code pasted into the Additional scripts box for the order status page (or checkout.liquid on Plus). That last part is what made purchase tracking work.

Checkout extensibility removed it. Shopify's own Google Tag Manager help page sets out the timeline: August 28, 2025 was the deadline to upgrade the Thank you and Order status pages, and from January 2026 automatic upgrades began, with customizations using additional scripts, apps with script tags or checkout.liquid on those pages lost. For apps, Shopify's developer docs give separate dates for order status script tags: they stopped running for Plus stores on August 28, 2025 and for all other stores on August 26, 2026.

The practical result: if a client's purchase tracking still depends on a snippet in Additional scripts, it is either already gone or should be treated as gone. Shopify's stated replacement for analytics and conversion tracking is web pixels, managed as customer events.

How customer events and pixels work

Shopify describes customer events as actions that happen in the customer's browser, such as viewing a product or adding to cart. Pixels are scripts that subscribe to those events and send data to a platform. Shopify says pixels load automatically on the storefront, checkout, Thank you page and Order status page.

The standard events Shopify publishes include page_viewed, product_viewed, collection_viewed, search_submitted, product_added_to_cart, cart_viewed, checkout_started, checkout_contact_info_submitted, checkout_address_info_submitted, checkout_shipping_info_submitted, payment_info_submitted and checkout_completed.

checkout_completed is the one that matters most. Shopify's developer docs say it is triggered once for each checkout, typically on the Thank you page. With post-purchase upsells it fires on the first upsell offer page instead and is not triggered again on the Thank you page. If the page where it should fire fails to load, it is not triggered at all. That once-per-checkout behaviour is a real improvement over the old order status page, where a reload could fire a purchase tag again.

App pixels vs custom pixels

App pixelsCustom pixels
Who installs itAn app or sales channel, such as Google & YouTube or Facebook & InstagramYou, by pasting JavaScript into the pixel editor
SandboxStrict sandboxLax sandbox
Privacy settingsSet by the app partner; the merchant cannot change themYou choose the permission and data sale settings
SupportThe app developerShopify does not support custom pixel code; you own it
Typical useGoogle Ads, GA4 and Meta through the official appsGTM, or platforms without a suitable app

One newer setting is worth knowing. App pixels have a data access setting of Always on or Optimized, and Shopify says Optimized is the default. Under Optimized, Shopify can pause some or all data from a marketing pixel it judges to be oversharing, based on signals such as referring traffic and sales, until relevant activity resumes. Analytics-only pixels are not optimized. If a marketing app pixel goes quiet on a store, check this setting and the pixel's activity log before you start rebuilding anything.

The sandbox and what it means for GTM

Every pixel runs in a sandbox, an isolated environment that keeps it away from the rest of the store. Shopify lists what that rules out:

  • No UI. Pixels cannot render buttons, banners or forms.
  • No DOM scraping. Pixels cannot detect clicks, scrolls, form fields or outbound links from the page. Anything you need from the page has to be published as a custom event with Shopify.analytics.publish() from the theme.
  • Sandbox URLs. In the lax sandbox, automatically detected page URLs include sandbox information and may not match the real page URL. Shopify's advice is to take the URL from the page_viewed event.

GTM can run as a custom pixel, and Shopify publishes a tutorial for it. The pattern is: paste the GTM head snippet (without the script tags) into a custom pixel, subscribe to Shopify's events, and push them into the dataLayer, where your GTM triggers pick them up. Shopify's tutorial maps checkout_completed to GA4's purchase and checkout_started to begin_checkout.

analytics.subscribe("checkout_completed", (event) => {
  const checkout = event.data.checkout;
  window.dataLayer.push({ ecommerce: null });
  window.dataLayer.push({
    event: "purchase",
    ecommerce: {
      transaction_id: checkout.order?.id,
      value: checkout.totalPrice?.amount,
      currency: checkout.currencyCode,
      items: [] // map checkout.lineItems here
    }
  });
});

Things to know before you choose this route:

  • GTM in a pixel is still sandboxed. Click triggers, element visibility, scroll depth and form listeners in that container will not see the store's pages.
  • Debugging is different. Shopify's tutorial says Tag Assistant's troubleshoot feature is not compatible with custom pixels. Use Shopify's Pixel Helper, the browser console filtered to the pixel's iframe, and the receiving platform's own debug views.
  • Turn off GA4's automatic page tracking in that setup and send page_view yourself from page_viewed with the real URL, or your page reports fill with sandbox URLs.
  • Pick the revenue value on purpose. Google's reference describes value as the sum of item price times quantity, excluding shipping and tax, while Shopify's example maps the order total. Either can be right for the client. Decide once and use the same definition in GA4 and Google Ads.
  • Check the order ID format. Make sure the transaction_id you send is the same ID any later system (refunds, offline imports, the client's reporting) will use.

Many agencies keep a GTM container in theme.liquid for storefront-only things like click tracking. That is fine, but that container cannot see checkout or the Thank you page, and it must not also send purchases or the same page views the pixel sends.

Shopify's Google & YouTube app

Google's help centre recommends the Google & YouTube app as the way to measure Shopify stores for Google Ads and GA4. You connect a GA4 web stream and a Google Ads account inside the app. Google's guidance says purchase, add to cart and checkout started are the suggested default conversion actions in Google Ads, and that you can create new actions, select existing ones, or choose not to measure an event.

Settings that matter for agencies:

  • Customer event settings in the app's Settings tab control which conversion action each event feeds. Check these on any inherited store. It is common to find the app creating new purchase actions alongside an older purchase action that is still primary.
  • Enhanced conversions can be turned on when you first connect Google Ads or later under Google Ads settings. The enhanced conversions setup guide covers what to check once it is on.
  • One linked Google Ads account. Google notes the app links only one Google Ads account directly. Extra accounts need tags added another way.
  • GTM is not set up through the app. Google says you cannot set up Tag Manager through the Google & YouTube app and recommends moving Google tags out of GTM containers on Shopify sites into the app.

Google's own setup guide also warns you to check for duplicate tags if you track conversions in the app and in the storefront or a custom pixel, and to remove legacy tags to prevent duplicate measurement. Shopify's GTM page says the same about running GA4 in GTM alongside its built-in integration.

Shopify's Facebook & Instagram app

The Facebook & Instagram app installs the Meta pixel as an app pixel. Its data sharing levels, set under Sales channels > Facebook & Instagram > Settings > Data sharing settings, are Standard (pixel only), Enhanced (pixel plus the Conversions API) and Maximum (pixel plus the Conversions API, with Meta's latest advertising technology).

For most clients, the decision is simply: let the app own Meta, at Enhanced or Maximum, and remove every other Meta install. Meta-specific duplicate sources and how to clean them up are covered in detail in Meta Pixel duplicate events on Shopify and WordPress, so we will not repeat them here.

Where duplicates come from

On a Shopify store with any history, assume duplicates until you have proved otherwise. The usual sources:

  1. App plus custom pixel for the same platform. The Google & YouTube app sends GA4 and Google Ads purchases, and a GTM custom pixel sends them again.
  2. App plus theme code. A gtag or GTM snippet in theme.liquid still fires purchase or conversion tags, or still sends GA4 page views that the app also sends.
  3. Leftover or converted legacy tags. Older stores sometimes still carry a Google Analytics tag from the old Online Store preferences setup, in some cases moved into a custom pixel during Shopify's migrations. Look in the custom pixels list for any pixel you did not create, and check what it sends.
  4. Two purchase conversion actions both set to primary in Google Ads. For example, the app's new purchase action and an old GA4-imported purchase key event. Both count, and both feed bidding. Our fix page on Google Ads counting conversions twice walks through the check.
  5. Third-party tracking apps that install their own pixels for GA4 or Google Ads on top of the official apps.

Shopify's own instruction when you add a custom pixel is to remove or change existing pixel code in theme.liquid, checkout.liquid and Additional scripts first, to prevent events being counted twice. Do that before you connect anything new.

Decide one owner per platform

PlatformSimplest ownerWhen to use a custom pixel instead
Google AdsGoogle & YouTube appSeveral Google Ads accounts, or conversion logic the app cannot express
GA4Google & YouTube appYou need custom events, custom parameters or a server-side GTM route
MetaFacebook & Instagram appRarely; only with a clear reason and a deduplication plan

Write the decision down in the client's tracking documentation. The next person to touch the store needs to know that "add GA4" means nothing should be added.

Consent: Shopify's customer privacy settings

Pixel consent on Shopify is controlled by the store's customer privacy settings, not by your tags. Shopify says that in markets requiring consent, usually the EEA and UK, pixels run only after visitors grant the permissions set in the pixel's configuration, and that new custom pixels require Marketing and Analytics permission by default. You can change a custom pixel's Permission and Data sale settings in its Customer privacy section. App pixels' privacy settings are set by the app partner.

The consent itself comes from a banner. Shopify has a built-in cookie banner under Settings > Customer privacy, and third-party consent apps must integrate with Shopify's Customer Privacy API. Shopify warns that if the consent regions in its settings and the third-party app do not match, non-essential data can be processed before a visitor consents. Google's help says that with a CMP integrated with the Customer Privacy API, consent mode should work automatically for the Google & YouTube app.

Where agencies trip up:

  • Hardcoded consent in a GTM pixel. Shopify's GTM tutorial example sets all Google consent types to granted, and Shopify notes those settings might not match your region's requirements. Do not ship it as-is. Read the visitor's state from init.customerPrivacy and listen for the visitorConsentCollected event to update Google consent when the visitor chooses.
  • Pixel set to "Not required" to fix missing data. That gets numbers back by ignoring consent. It is a legal question for the client, not a tracking fix.
  • Region mismatch between a third-party banner and Shopify's settings, as above.

The Consent Mode v2 implementation guide covers the Google signals in detail, and the consent mode checker gives a quick first read on what a store sends before and after consent.

How to test a purchase

Do not sign off Shopify tracking without a completed order. Shopify offers a test payment gateway, Shopify Payments test mode, or a real order that you cancel and refund. Shopify notes customers cannot place live orders while payment providers are in test mode, so agree a window with the client, or use a development store first.

  1. Confirm pixel status. In Settings > Customer events, every pixel you rely on should show Connected, and nothing unexpected should be connected.
  2. Open the Pixel Helper. From the pixel's page, use Test to open the store with Shopify's Pixel Helper. If it shows the pixel awaiting consent, accept on the banner. You can test one pixel at a time.
  3. Walk the funnel. Product page, add to cart, checkout, shipping, then complete the order. Check each event arrives and its callback succeeds.
  4. Check each platform. GA4 Realtime (or DebugView, if you can enable debug mode) for one purchase with the right transaction ID and value. Google Ads conversion diagnostics, allowing for reporting delay. Meta Test Events for one deduplicated Purchase.
  5. Reload the Thank you page and confirm nothing fires a second purchase. If something does, it is not coming from checkout_completed; look for theme or third-party code.
  6. Repeat with consent declined in a consent region and confirm the pixels behave as configured.
  7. Compare over a week. Orders in Shopify against purchases in GA4, Google Ads and Meta. Expect gaps from consent, attribution and timing, which the guide to GA4 vs Google Ads discrepancies explains. A platform showing more purchases than Shopify has orders is a duplicate until proven otherwise.

Audit checklist for an inherited Shopify store

  • List every app pixel and custom pixel, and who owns each
  • Search theme.liquid and theme snippets for gtag, GTM and Meta code
  • Look for a converted legacy Google Analytics custom pixel
  • Check the Google & YouTube app's customer event settings against Google Ads primary conversion actions
  • Check the Facebook & Instagram app's data sharing level
  • Check app pixel data access (Always on or Optimized) for marketing pixels
  • Check banner regions and each custom pixel's permission settings
  • Place a test order and reconcile a week of orders against each platform

Getting it done

Most Shopify tracking problems are not hard once you see every source in one place: remove what is old, give each platform one owner, and prove it with a test order. If you'd rather have this set up and tested for a client, send us one account.

Just one quick fix, not a whole account? Our founder takes small fixed-price jobs on Fiverr: Google Ads conversion tracking fix

Frequently asked questions

Can I still use Google Tag Manager on Shopify?

Yes. GTM can run as a custom pixel under Settings > Customer events, and it can also stay in the theme for storefront-only tracking. In the pixel it runs inside Shopify's sandbox, so it cannot see page clicks, forms or scrolls, and Tag Assistant's troubleshooting does not work with custom pixels.

Do I still need code in Additional scripts for purchase tracking?

No. Additional scripts and checkout.liquid on the Thank you and Order status pages have been retired as stores were upgraded. Purchase tracking should come from the checkout_completed customer event through an app pixel or a custom pixel.

Does checkout_completed fire again if the customer reloads the Thank you page?

Shopify's documentation says checkout_completed is triggered once per checkout and is not triggered again on the Thank you page. If you see a second purchase on reload, it is coming from other code such as a theme snippet or a third-party app.

Should I use the Google & YouTube app or a GTM custom pixel for Google Ads?

For most stores the app is simpler and is what Google recommends. Use a custom pixel when you need several Google Ads accounts, custom events or a server-side route. Whatever you choose, do not run both for the same conversions.

Why are my Shopify pixels not firing for EU visitors?

In consent regions Shopify only runs a pixel after the visitor grants the permissions set for it, which for new custom pixels are Marketing and Analytics by default. Check the cookie banner, its regions, and each pixel's permission settings.

Muhammad Qitmeer

Written by

Muhammad Qitmeer, founder of Augere Labs

Augere Labs is the white-label tracking partner behind marketing agencies. If a client account has numbers you don't trust, I'm happy to look at it with you and tell you straight what's wrong.

Connect on LinkedIn