Google Ads

Google Tag Manager on Shopify: What Works in 2026

For Shopify store owners and marketers who run Google Ads: where Google Tag Manager can still load after Shopify's checkout changes, which tracking route to pick, and how to send one clean purchase with the right value.

Safeer SafeerGoogle Ads & Merchant Center strategist Updated 17 min read
Diagram of where Google Tag Manager runs on a Shopify store: theme code on storefront pages, a sandboxed custom pixel on checkout, and the Google & YouTube app for Google Ads purchases

Quick answer

On Shopify in 2026, Google Tag Manager in theme code loads only on storefront pages. Checkout, Thank you and Order status pages accept it only as a custom pixel inside Shopify's sandbox, a setup Google does not support for Google tags. Track Google Ads purchases with the Google & YouTube app and keep GTM for tags that have no app.

Key takeaways

  • Google Tag Manager pasted into theme.liquid loads on storefront pages only, so it never sees checkout, the Thank you page or the Order status page where the purchase happens.
  • Shopify made the Additional scripts box view-only on August 28, 2025, and non-Plus stores that had not upgraded their Thank you and Order status pages by August 26, 2026 were upgraded automatically.
  • Google says running Google tags or a Tag Manager container inside a Shopify custom pixel is not a supported setup, so the Google & YouTube app should carry Google Ads and GA4 measurement.
  • A transaction ID only removes repeats inside one conversion action, so a store with two purchase actions set to Primary counts every sale twice and inflates reported ROAS.
  • In a GTM custom pixel, map the Shopify order ID to Transaction ID, the checkout currency to Currency Code and one consistent revenue field to Conversion Value, because an empty value field sends 0.
On this page
  1. Where can Google Tag Manager run on Shopify in 2026?
  2. What changed at Shopify checkout, and why are most GTM guides out of date?
  3. Google & YouTube app or a GTM custom pixel: which should you use?
  4. How do you add Google Tag Manager to Shopify as a custom pixel?
  5. How do you send a Google Ads purchase with value, currency and transaction ID?
  6. How do you stop double-counting when two tracking methods fire?
  7. How does Consent Mode v2 work with GTM on Shopify?
  8. Do you need server-side tagging on Shopify?
  9. How do you test Google Ads tracking on Shopify?
  10. Why is Google Tag Manager not tracking on Shopify?
  11. When should you get help with Shopify conversion tracking?
  12. FAQ

Where can Google Tag Manager run on Shopify in 2026?

Google Tag Manager can run in two places on a Shopify store. In theme code, it loads on storefront pages only. As a custom pixel, it loads on every page, including checkout, the Thank you page and the Order status page, but inside Shopify's sandbox. The old third place, the Additional scripts box in checkout settings, no longer runs tracking on those order pages.

That split decides what GTM can see. A container in theme.liquid loads on product, collection, cart and content pages, so it never sees a finished order. Checkout had its own layout file, checkout.liquid, open only to Shopify Plus and now unsupported on every checkout step, per Shopify's developer docs. Pixels, by contrast, load on the storefront, checkout, Thank you page and Order status page (Pixels overview).

What you needGTM in theme codeGTM as a custom pixelGoogle & YouTube app
Storefront pagesYesYes, in the sandboxYes
Checkout stepsNoYes, in the sandboxYes
Thank you and Order status pagesNoYes, in the sandboxYes
Google Ads purchase with value and transaction IDNo, it never sees the orderYes, if you code itYes, built in
Enhanced conversions for purchasesNoMay not work, says GoogleA switch in the app's settings
Google's advice for Google tagsMove them to the appNot supported; move them to the appRecommended
Shopify's positionYour code; edits take the theme off automatic upgradesUnsupported by ShopifyRecommended; maintained by Google

Can you still add GTM to theme.liquid?

Yes, for storefront tags. Go to Online Store › Themes, duplicate the live theme as a backup, open the theme's three-dot menu, choose Edit code and open theme.liquid in the Layout folder. In GTM, click Admin › Install Google Tag Manager and paste the two blocks where the install screen shows. Shopify notes that editing theme code takes a theme off its automatic upgrade path (Storefront script tags). This container never fires a purchase, so keep Google Ads purchase tags out of it.

What changed at Shopify checkout, and why are most GTM guides out of date?

Shopify retired every script-based way to put tags on checkout and the order pages, and the last deadline passed on August 26, 2026. Guides that tell you to paste GTM into Settings › Checkout › Additional scripts or into checkout.liquid describe a setup that no longer runs.

Feb 1, 2025Apps can no longer create script tags for the Order status page
Aug 28, 2025Additional scripts become view-only; Plus stores lose checkout.liquid, additional scripts and script tags on the order pages
Aug 26, 2026Non-Plus deadline; stores not upgraded are upgraded automatically and script tags stop on the Order status page
Oct 1, 2026Apps can't create or update storefront script tags
Mar 1, 2027Shopify stops injecting script tags into storefront pages
Shopify's checkout tracking timeline, from the Shopify Help Center and Shopify developer docs. Pixels replace scripts for tracking on every page.

Sources: Shopify's non-Plus upgrade guide, its deadline notice and the Order status script tags page. Additional scripts aren't supported on the new order pages, and a disabled script can't be switched back on after the upgrade.

We checked the pages ranking for "google tag manager shopify" on November 3, 2026. Several still send you to the Additional scripts box, including a HulkApps guide and a Shopify Community answer from December 2023. One 2024 guide points to Online Store › Preferences, a Google Analytics field Shopify turned into a custom pixel for stores that had not moved to the Google & YouTube app by February 2, 2025 (Google's migration guide).

A silent stop looks like this: Google Ads purchases drop around late August 2026 while Shopify orders hold steady. If your purchase tag lived in additional scripts or came from an old app's script tag, it stopped when the store was upgraded. To confirm the upgrade, open Settings › Checkout and look at the Configurations section. An upgrade notice there means the old pages are still in use.

Google & YouTube app or a GTM custom pixel: which should you use?

Use the Google & YouTube app for every Google tag (Google Ads, GA4, Floodlight) and keep a GTM custom pixel for tags that have no Shopify app of their own. Google and Shopify both give this advice, and Google is blunt about the alternative.

Google's page on custom pixel limitations says: "Running Google tags inside Shopify's custom pixel feature is not a supported implementation." Google support won't help fix the resulting issues, and Tag Manager can't be set up through the Google & YouTube app, so Google tells you to move Google tags out of GTM containers on Shopify and into the app. Shopify's custom pixels page says custom pixels are unsupported by Shopify too.

Features Google says may break in the sandbox include enhanced conversions, conversion verification, cross-domain measurement, consent mode URL passthrough, GTM Preview mode, many triggers and variables, and any tag that changes the page, such as a chat widget.

Google & YouTube app

  • Built and maintained by Google
  • Maps purchase, add to cart and checkout started to Google Ads
  • Sends transaction IDs automatically
  • Enhanced conversions with one switch
  • Feeds Google's server-to-server purchase import

GTM as a custom pixel

  • You write, test and maintain the code
  • Runs in Shopify's sandbox on every page
  • Unsupported by Shopify and, for Google tags, by Google
  • Preview mode and many triggers may fail
  • Right for tags with no Shopify app
For Google Ads purchase tracking on Shopify, the app is the default. A GTM custom pixel is the fallback for everything else.
Your situationUseWhy
Google Ads and GA4 onlyGoogle & YouTube appGoogle maintains it as Shopify's checkout changes
Two or more Google Ads accountsThe app, plus a custom conversion ID and label for each extra accountThe app links one account directly and accepts the rest manually
An ad or analytics platform with its own Shopify appThat platform's app pixelShopify recommends app pixels for stability, security and performance
A tag with no Shopify app, or your own custom eventGTM as a custom pixelThe supported route to checkout and order pages for non-Google code
A storefront tool that draws on the page, like a chat widgetGTM in theme code, or the tool's appPixel sandboxes can't render buttons, forms, banners or pop-ups

The full app setup, from Merchant Center to campaigns, is in our guide to Google Ads for Shopify.

How do you add Google Tag Manager to Shopify as a custom pixel?

Copy the GTM head snippet without its script tags, paste it into a new custom pixel under Settings › Customer events, subscribe to Shopify's standard events and push them into the data layer, then connect the pixel. Shopify's GTM custom pixel tutorial and custom pixel guide give the base steps; we added the checks that catch the usual mistakes.

  1. Remove old copies first. Shopify tells you to delete existing pixel code from theme.liquid, checkout.liquid and the Additional scripts box before adding a pixel, so events aren't counted twice.
  2. Copy the container code. In GTM, click Admin › Install Google Tag Manager, copy the block meant for the head, and delete the <script> and </script> tags around it.
  3. Create the pixel. In Shopify, go to Settings › Customer events, give the pixel a unique name such as "GTM", click Add pixel and paste the code into the Code window.
  4. Set the privacy options. In the pixel's privacy section, choose the Permission setting (Required or Not required) and the Data sale setting. New pixels require Marketing and Analytics permission by default.
  5. Subscribe to the events you need. Add analytics.subscribe() calls that push each event into window.dataLayer. For Google Ads, checkout_completed is the purchase; the next section shows which fields to send.
  6. Fix the consent line. Shopify's example code includes a Consent Mode v2 update that sets all four consent types to granted. Shopify notes these example settings might not match your region's rules, so replace that line before you go live.
  7. Save and connect. Click Save, then Connect pixel, and confirm. A pixel that is saved but not connected tracks nothing.
  8. Build the GTM side and publish. Shopify notes that at least one tag and one trigger must exist in GTM before any data moves.

Theme events sent with dataLayer.push() never reach the sandbox. Shopify's fix is to publish them with Shopify.analytics.publish() in the theme and subscribe to them in the pixel.

How do you send a Google Ads purchase with value, currency and transaction ID?

Subscribe to checkout_completed, push the order ID, the currency and one revenue figure into the data layer, then map them to Transaction ID, Currency Code and Conversion Value in a Google Ads Conversion Tracking tag fired by a Custom Event trigger. Each field has one correct Shopify source.

Data layer keyShopify field in checkout_completedGTM setupGoogle Ads tag field
eventYour event name, for example checkout_completedCustom Event trigger with the same nameTriggering
transaction_idevent.data.checkout.order.idData Layer VariableTransaction ID
currencyevent.data.checkout.currencyCodeData Layer VariableCurrency Code
valueevent.data.checkout.subtotalPrice.amountData Layer VariableConversion Value

Field names come from Shopify's checkout_completed reference. The order ID is empty on every other event, one more reason to fire the purchase only there.

Which value should the purchase send?

Send the revenue figure your margin math uses. subtotalPrice is the price before duties, shipping and taxes, and since late April 2025 it subtracts order-level discounts, per Google's migration notes. totalPrice includes duties and taxes, and Shopify's GTM example maps it to value.

Value we sendsubtotalPrice = items after discounts, before shipping, duties and tax

We use subtotalPrice because tax is not revenue you keep, and counting it makes ROAS look better than it is. Use one field everywhere and compare results with your break-even point, as our ROAS formula guide shows.

How do you build the Google Ads tag in GTM?

  1. Get the conversion ID and label. In Google Ads, go to Goals › Conversions › Summary › New conversion action › Website and choose Use Google Tag Manager.
  2. Create the trigger. A Custom Event trigger whose event name exactly matches the event key in your pixel.
  3. Create the variables. One Data Layer Variable each for transaction_id, currency and value.
  4. Create the tag. Google Ads › Google Ads Conversion Tracking, with the ID and label, and the three variables in Conversion Value, Transaction ID and Currency Code. Then publish.

Two settings that quietly ruin the data: if the Conversion Value field is empty or undefined, GTM sends 0, per Google's Google Ads conversions guide. And a transaction ID that starts with GG_ means Google generated it because your tag sent none, per Google's transaction ID page.

Post-purchase upsells move the event. Shopify says checkout_completed fires once per checkout, usually on the Thank you page, but on the first upsell offer page when an upsell runs, and not again on the Thank you page. If that page fails to load, the event never fires. Test one order through every upsell path you run.

How do you stop double-counting when two tracking methods fire?

Keep one purchase conversion action as Primary, set every other purchase action to Secondary or remove it, and confirm that all sources send the same transaction ID. A transaction ID only removes repeats inside the same conversion action, so two Primary purchase actions count every sale twice.

Google's transaction ID page says that when two conversions for the same conversion action share a transaction ID, the second isn't counted. When several sources feed one action, the IDs must match exactly; a different prefix or an extra space stops the match. The usual pairs that double-count on Shopify:

  • The Google & YouTube app purchase and a GTM custom pixel purchase, both Primary.
  • A third-party GTM app sending purchases next to the Google & YouTube app.
  • A GA4 purchase imported into Google Ads beside a native Google Ads purchase, both Primary.
  • Two Google tags for the same account, one from the app and one added by hand.

One pair is safe: with the app set up, Google's server-to-server purchase import through Data Manager is deduplicated against the tag automatically (Shopify Data Manager page).

What double-counting does to your numbers

For example, a store selling kitchen tools spends $3,000 in a month and gets 50 real orders from ads at an average subtotal of $108. Real revenue from ads is $5,400, a ROAS of 1.8. With the app and a GTM pixel both Primary, Google Ads records 100 purchases worth $10,800 and reports 3.6.

Real ROAS 1.8$5,400 from 50 orders
Break-even ROAS 2.5At a 40% margin
Reported ROAS 3.6Every order counted twice
Illustrative numbers, not a client result. The store loses money below 2.5x, yet the doubled data says it is well above break-even.

At a 40% margin the store needs 2.5x to break even, so it loses money while the report shows a profit, and Target ROAS bidding spends more on the strength of that number. To find duplicates, check the Hits sent tab in Tag Assistant, as Google's duplicate events guide shows, then review which purchase actions are Primary in Goals › Conversions › Summary. Our Google Ads conversion tracking guide covers Primary actions and GA4 imports in depth.

Consent Mode v2 tells Google tags what each visitor agreed to through four signals: ad_storage, analytics_storage, ad_user_data and ad_personalization. With the Google & YouTube app, it switches on automatically once a consent banner is in place. In a GTM custom pixel, you wire it yourself.

  • Where it matters. Shopify says consent markets are usually the European Economic Area and the United Kingdom. There, pixels run only after a visitor grants the permissions set on the pixel.
  • The app route. Google's Shopify consent guide says Shopify's built-in cookie banner enables consent mode automatically, and a third-party consent tool must connect to Shopify's privacy API.
  • The custom pixel route. A pixel set to Required doesn't load until the visitor consents, which works like Google's basic consent mode. Advanced consent mode, with cookieless pings while consent is denied, needs the container to load first and update consent later (About consent mode).
  • The trap in the example code. Shopify's sample pixel sets all four signals to granted for every visitor. Pasted as is, it tells Google that people who declined said yes.

If you sell into the EEA or the UK and want consent set up and verified on every route, see our Consent Mode v2 setup service.

Do you need server-side tagging on Shopify?

Most Shopify stores do not need a server-side GTM container to track Google Ads purchases. Google already runs a server-to-server purchase import for Shopify through Data Manager when the Google & YouTube app is installed. Server-side GTM earns its cost when you send the same events to several platforms and want control over what leaves your server.

The Data Manager integration sends purchases from Shopify's servers to Google Ads next to the browser tag, and Google deduplicates the two. For now it covers only the "Checkout completed" event, activates once the app's tagging is set up, and needs the enhanced conversions terms accepted.

A server-side GTM container is different. Google's introduction to server-side tagging describes a container that runs on a server you control, in a Google Cloud project or elsewhere, and turns browser requests into events for your tags. Google strongly recommends a first-party domain and production mode before real traffic. On Shopify the browser half still comes from a pixel, so the sandbox limits still apply on that side.

OptionWhat it sendsWho maintains itBest for
Google & YouTube app with enhanced conversionsBrowser purchase plus hashed first-party dataGoogleEvery Shopify store on Google Ads
App plus Data Manager purchase importServer-to-server purchases, deduplicated with the tagGoogle; switches on with the appStores that want purchases to survive browser loss
Server-side GTM containerAny event you route through your serverYou or your developer, plus hostingStores feeding several ad and analytics platforms

Work in that order. Turn on enhanced conversions first (our guide to enhanced conversions covers the setup and the Data Manager change), confirm the Data Manager import is active, and add a server container only if purchases are still missing after that.

How do you test Google Ads tracking on Shopify?

Place a test order, confirm that one purchase event fired with the right value, currency and transaction ID, confirm that only one purchase action is Primary, then compare Google Ads with Shopify after a week. For a custom pixel, open the Shopify Pixel Helper with the Test button on the pixel in Settings › Customer events; Shopify's testing guide explains its green and red status dots.

  • Settings › Checkout shows no upgrade notice
  • Old GTM and Google Ads code is gone from theme.liquid and old apps
  • The Pixel Helper shows checkout_completed with a green dot
  • The value matches the order to the cent, from the same field every time
  • The transaction ID is the real order ID, not empty or a GG_ ID
  • Tag Assistant's Hits sent tab shows one Google Ads purchase per order
  • Only one purchase action is Primary in Goals › Conversions › Summary
  • Declining the cookie banner stops or limits tags as intended
  • An order through each upsell path still records one purchase
  • After seven days, Google Ads purchases roughly match Shopify orders from Google traffic

Why is Google Tag Manager not tracking on Shopify?

Most failures on Shopify trace back to an old script that stopped, a second purchase source, an empty variable or consent blocking the pixel. Match your symptom to a row below.

SymptomLikely causeFix
Google Ads purchases fell near zero around August 26, 2026, while orders heldThe purchase tag lived in additional scripts or an old app's script tag, and the store was upgradedSet up the Google & YouTube app and test an order
Google Ads shows about twice as many purchases as ShopifyTwo purchase actions are Primary, such as the app plus a GTM pixel, or a GA4 import plus a native tagKeep one Primary purchase action; set the rest to Secondary
Conversion value is 0The value variable is empty or its name doesn't match the data layer keyMatch the Data Layer Variable name exactly and retest
Diagnostics say the Google tag is missing a transaction ID, or IDs start with GG_No transaction ID is mappedMap checkout.order.id to Transaction ID
GTM Preview shows nothing and Tag Assistant can't find the tagsThe container runs inside the pixel sandboxUse the Shopify Pixel Helper, then check the Google Ads conversion
The pixel never fires for some visitorsThe pixel needs consent, or a third-party banner isn't synced to Shopify's privacy APITest with consent given; ask the banner provider to sync consent to Shopify
Orders with a post-purchase upsell are missingcheckout_completed fires on the first upsell page, and fails if that page doesn't loadTest an order through each upsell path
A chat widget or banner from GTM doesn't appearPixel sandboxes can't render page elementsLoad it from theme code or the tool's own app
Purchases track but attribution to ads looks weakGoogle tags in a custom pixel can lose data and attribution, per GoogleMove Google Ads measurement to the Google & YouTube app

For the conversion statuses Google Ads shows on each action, such as unverified or no recent conversions, see the troubleshooting section of our conversion tracking guide.

When should you get help with Shopify conversion tracking?

Get help when Google Ads purchases and Shopify orders still disagree after you remove duplicate sources, when you sell into the EEA or the UK, or when you are weighing a server-side container. Each of those needs your account, pixels and consent setup read together.

We set up and audit Shopify tracking for stores on Google Ads: one Primary purchase with the right value, enhanced conversions, consent and a check against real orders. See our Google Ads conversion tracking service, or start with a free Google Ads audit, where we tell you whether we found what is breaking your purchase data.

Frequently asked questions

Can you use Google Tag Manager on Shopify checkout?

Yes, but only as a custom pixel. Theme code does not load on checkout, and checkout.liquid and additional scripts no longer run on the Thank you and Order status pages. A GTM container added under Settings › Customer events runs on checkout, Thank you and Order status pages inside Shopify's sandbox, with the sandbox's limits. Google does not support Google tags inside a custom pixel, so send Google Ads purchases through the Google & YouTube app instead.

Does Shopify still support additional scripts?

No. Shopify made the Additional scripts section in checkout settings view-only on August 28, 2025, and additional scripts are not supported on the new Thank you and Order status pages. Plus stores lost them on that date. Non-Plus stores had until August 26, 2026 to upgrade those pages, and Shopify upgraded the rest automatically. Tracking that used to live there now has to come from an app pixel or a custom pixel.

Is there a Google Tag Manager app for Shopify?

Not from Google. Google's own Shopify app is the Google & YouTube app, and Google says Tag Manager can't be set up through it. Third-party apps in the Shopify App Store add a GTM container and a data layer for you, but on checkout pages they still run inside Shopify's pixel sandbox. Google advises confirming their behavior with the provider and adding Google measurement from the Google & YouTube app on those pages.

Why doesn't GTM Preview mode work with a Shopify custom pixel?

Because the container runs in a sandboxed frame, not on the page itself. Google lists Preview mode, many trigger types and many built-in variables among the features that may not work in Shopify's custom pixel sandbox. Shopify adds that the Troubleshoot tag feature in Google Tag Assistant can't detect tags inside a custom pixel. Test with the Shopify Pixel Helper instead, then confirm the conversion arrived in Google Ads.

How do you remove Google Tag Manager from Shopify?

Remove it from every place it can load. In Online Store › Themes › Edit code, delete the GTM snippets from theme.liquid and any snippet file that includes them. In Settings › Customer events, disconnect or delete the GTM custom pixel. Then check installed apps that add their own container. After that, place a test order and confirm Google Ads records exactly one purchase from the Google & YouTube app.

Do you need Google Tag Manager if you use the Google & YouTube app?

Not for Google Ads or GA4. The Google & YouTube app installs the Google tag, maps purchase, add to cart and checkout started to conversion actions, sends transaction IDs and turns on enhanced conversions with a switch. GTM earns its place on Shopify only for tags with no app of their own. Adding GTM for Google tags creates a second purchase source that you then have to deduplicate.

Is GTM in theme.liquid still worth using on Shopify?

Only for storefront tags. A container in theme.liquid loads on product, collection, cart and content pages, never on checkout or the order pages, so it cannot see the purchase. It suits storefront tools such as a heatmap or a chat widget that need the full page. Shopify notes that editing theme code takes a theme off its automatic upgrade path, so keep a dated record of every change.

Sources27 references
  1. Shopify Help Center: Upgrading and replacing your Thank you and Order status pages
  2. Shopify Help Center: Non-Plus, upgrading and replacing your Thank you and Order status pages
  3. Shopify Help Center: Reviewing and replacing additional scripts on your Thank you and Order status pages
  4. Shopify Help Center: Replacing Google Tag Manager scripts on the Thank you page
  5. Shopify Help Center: Pixels overview
  6. Shopify Help Center: Custom pixels
  7. Shopify Help Center: Manage your custom pixels
  8. Shopify Help Center: Create a Google Tag Manager custom pixel
  9. Shopify Help Center: Testing custom pixels
  10. Shopify Help Center: Google Tag Manager
  11. Shopify developer docs: checkout.liquid (deprecation dates)
  12. Shopify developer docs: Order status script tags
  13. Shopify developer docs: Storefront script tags
  14. Shopify developer docs: checkout_completed standard event
  15. Google Ads Help: Limitations of using a custom pixel for conversion measurement on Shopify
  16. Tag Manager Help: Migrate your Google tags with the Google & YouTube app on Shopify
  17. Google Ads Help: Set up conversion tracking with the Google & YouTube app on Shopify
  18. Google Ads Help: Shopify: Set up your Google tag
  19. Google Merchant Center Help: How to avoid duplicated tracking events (Google & YouTube app on Shopify)
  20. Google Ads Help: Use a transaction ID to minimize duplicate conversions
  21. Tag Manager Help: Google Ads conversions
  22. Google Ads Help: About consent mode
  23. Analytics Help: Set up Shopify to obtain user consent
  24. Google Ads Help: Shopify (Data Manager connection)
  25. Google for Developers: An introduction to server-side tagging
  26. Google search results for 'google tag manager shopify' and 'how to add google tag manager to shopify', United States (checked November 3, 2026 via DataForSEO)
  27. HulkApps: Integrating Google Tag Manager with Shopify (checked November 3, 2026)
Safeer

Written by

SafeerGoogle Ads & Merchant Center strategist

Safeer leads strategy at Logical Gecko, a Google Partner and Shopify Partner agency that runs Google Ads for eCommerce and home-service brands and recovers suspended Merchant Center accounts. Everything in these guides comes from work on live client accounts. More about the team.

Free audit

Find out where your ad spend is leaking

A senior strategist reviews your account and shows you the fixes with the biggest payoff. No obligation, no hard sell.

Get a free Google Ads audit

Keep reading

Book your Google Ads strategy call

Fill in your details and we'll schedule a call to discuss your Google Ads growth.