Yes, you can still run Google Tag Manager on Shopify. But the install route changed: it now runs through custom web pixels on the new checkout, not the theme snippet alone. And if you already use Shopify's built-in Google Analytics connection, adding GTM on top can create duplicate tracking.
This guide walks you through the decision first (do you even need GTM?), then the install route, then a pre-launch QA checklist you run in GTM Preview mode before real customer traffic touches your tags.
The path in 7 steps
The steps of this page, in order.
-
01 Do you need it Check whether Shopify's built-in analytics already covers your reporting.
-
02 Pick the route Choose between custom web pixel, theme snippet, or an app.
-
03 Install GTM Add the container to your store using the route you picked.
-
04 Map your data Set up events and a data layer for ecommerce actions.
-
05 Audit duplicates Make sure sessions and conversions are not counted twice.
-
06 Test before launch Run Preview mode and Tag Assistant on a staging or test order.
-
07 Publish and monitor Go live, then watch the first 48 hours of real data.
01 / 15
Do you actually need Google Tag Manager?
If Shopify's built-in Google Analytics and customer events already give you the reports you read, you likely do not need GTM.
Google Tag Manager (GTM) is a container that fires tracking codes on your site based on rules you set, without editing theme code each time. It does not replace Google Analytics 4 (GA4), Google's reporting platform: GTM only delivers the data your tags send to GA4. The Google tag is the single base code that connects your site to Google's tools; GTM is one way to deploy it.
Shopify's built-in Google & YouTube app sends standard ecommerce data to GA4 without code. Reach for GTM when you need ad platforms, custom pixels, or event logic the built-in integration cannot handle.
Built-in Google & YouTube app
The native Shopify app that connects your store to GA4 and Google Ads. Best for owners who only need standard ecommerce reporting and want zero code maintenance.
- Setup effort
- Minutes, no code
- Maintenance
- Shopify-managed
- Coverage
- GA4 and Google Ads basics
Key pointStart here if you only read standard GA4 reports.
Google Tag Manager
A container that fires any tag, ad pixels, custom scripts, conversion APIs, by rule. Best for stores running multiple ad platforms or needing custom event logic.
- Setup effort
- Hours to days
- Maintenance
- You manage tags
- Coverage
- Any platform or custom pixel
Key pointAdopt GTM only when you must manage tags beyond Google's default.
02 / 15
What do you need in place before you start?
You need a GTM account and container, admin access to your Shopify store, and a clear list of which platforms must receive data.
Create the GTM account and container first, then copy the container ID (the GTM-XXXXXX string). Shopify makes Google Tag Manager available to every store through custom web pixels, so no plan upgrade is needed for this route. Make a short list of the events that matter: purchase, add-to-cart, begin-checkout, view-item. Finally, open your consent banner and note how it blocks tags.
GTM account and container created
Sign in to tagmanager.google.com, create a container for your store's domain, and save the container ID (GTM-XXXXXX). You will paste it into Shopify later.
Shopify plan and custom web pixel access confirmed
Log in to Shopify admin, go to Settings > Customer events, and check that you can add a custom pixel. If you cannot see the option, ask the store owner for the permission to manage customer events.
Event list documented
Write down the exact events you must send: purchase, add-to-cart, begin-checkout, view-item, and any others your ad platforms require. This becomes your build sheet.
Consent banner behavior verified
Open your cookie banner settings and confirm how it signals consent (for example, via dataLayer or a Shopify consent API). Tags must wait for that signal before firing.
Admin access and publishing rights
Make sure you have permission to edit the Shopify theme or customer events, and that you can publish changes in GTM (Publish button). Without both, you cannot go live.
03 / 15
Which install route should your store use?
Most stores now run GTM through a custom web pixel, but the theme snippet and app routes still have specific uses.
One route reaches the pages that matter to most stores today. The other two solve narrower problems: storefront-only tracking or hands-off wiring.
Match your store type and reporting need to the right install route
| Install route | Best for | Covers checkout & thank-you page? | Cost |
|---|---|---|---|
| Custom web pixel | Stores that need purchase and checkout events in GA4 or ads platforms | Yes | Free setup, your time |
| Theme snippet | Stores that only measure storefront browsing (views, add-to-cart on product pages) | No | Free setup, your time |
| Third-party GTM app | Small teams with no developer who accept an ongoing fee | Yes, as the app wires it | Per-transaction or monthly fee, check the app's current pricing page |
Route choice depends on where your data needs to come from, not on which option sounds most advanced. Verify each app's pricing on its own listing before committing.
Going further
Snippet limits
Rule to know
What the theme snippet still covers today
The theme snippet still tracks storefront browsing, but it goes silent at checkout.
A theme snippet lives in your Shopify theme code. It loads GTM on product, collection, cart, and other storefront pages, and it can fire tags on page views, clicks, and add-to-cart events there.
What it cannot do is reach Shopify's checkout or the thank-you page. Since the checkout upgrade, those pages run in an isolated environment that theme code does not touch, so a purchase tag placed in the snippet never fires.
That makes the snippet a valid choice only when your goal is storefront behavior, browsing patterns, engagement, or on-site campaigns. If revenue or conversion tracking matters, you need a route that runs inside checkout.
- Confirm your theme snippet covers only storefront pagesOpen a product page in GTM Preview and confirm tags fire, then open checkout and confirm they do not.
- Decide whether purchase tracking is in scopeIf ads platforms or GA4 need revenue data, the snippet alone will not deliver it.
- Keep the snippet if it still serves a purposeSome stores run both: snippet for storefront tags, web pixel for checkout and purchase events.
04 / 15
What changed with the Shopify checkout upgrade?
Shopify deprecated checkout.liquid and moved to a new extensible checkout, which changed where thank-you page tags can live.
Shopify retired the old checkout template, checkout.liquid, in February 2023 and pushed every store onto an extensible checkout. The Thank you and Order status pages had to be rebuilt by August 28, 2025. Automatic upgrades started in January 2026, and any custom script-tag code on those pages is removed.
The practical change is where your Thank you tags live. A custom web pixel is Shopify's current way to run tracking code on checkout and thank-you pages, replacing old script tags. In GTM terms, the purchase event no longer comes from a page tag on the thank-you URL; the pixel fires first and sends that event into your container.
Deprecated: checkout.liquid
The theme-level checkout template controlled the checkout and thank-you page. It was deprecated in February 2023 and no longer works on current stores.
- Status
- Deprecated
- Date
- February 2023
Key pointRemove it from your migration assumptions; it cannot host tags anymore.
Upgrade deadline: Thank you and Order status pages
These pages had to be rebuilt on the new checkout. The deadline was August 28, 2025 for stores that had not migrated.
- Deadline
- August 28, 2025
- Pages
- Thank you, Order status
Key pointConfirm your store is already on the new checkout before planning any GTM tag.
Automatic upgrades
Since January 2026, Shopify has been upgrading the remaining stores automatically. Old script-tag customizations on the checkout and thank-you pages are lost in that process.
- Start
- January 2026
- Effect
- Old script tags removed
Key pointRebuild checkout tracking as a custom web pixel, not as a script tag.
05 / 15
How do you install GTM on Shopify step by step?
Create the container, add the custom web pixel, connect your events, then verify each tag before publishing.
Start in Google Tag Manager: create a container for your Shopify domain and copy its GTM-XXXXXX ID. In Shopify, add a custom web pixel, a small script that runs on every storefront and checkout event, and point it at that container. The data layer, the structured object that carries order value, items, and currency, is what makes your tags useful rather than blind.
Shopify labels the custom web pixel GTM setup an advanced tutorial that Shopify itself does not support, so budget for a developer or choose an app if you are not comfortable maintaining pixel code. Then define one trigger, the rule that says when a tag fires, per event, and check every tag in GTM's Preview mode before publishing. The theme snippet route still covers page views, but it no longer reaches checkout.
-
Create the GTM container
In your Google account, create a container for your Shopify domain and copy the GTM-XXXXXX ID. Choose the Web platform.
-
Add the custom web pixel
In Shopify admin, go to Settings > Customer events, add a custom pixel, and paste the pixel code from Shopify's GTM tutorial, adapted with your container ID: the standard GTM snippet does not run as is inside a web pixel.
-
Define your triggers
Map each event you care about, page view, product view, add to cart, purchase, to a trigger in GTM. Each trigger needs the matching data layer variables.
-
Preview every tag
Use GTM's Preview mode with Google Tag Assistant to confirm each tag fires once, with the right values, before you publish the container.
06 / 15
Which ecommerce events should you send?
Start with the handful of events every store needs, and name them consistently so reports stay comparable.
Start with four events: view_item when a product page loads, add_to_cart when a shopper adds an item, begin_checkout when checkout starts, and purchase on the order confirmation. Send them through the data layer, a structured JavaScript object that passes event details such as order value, items, and currency from your store to GTM.
On purchase, always include value, currency, items, and transaction_id, the unique order number used to deduplicate sales. Keep the same event names on every platform so downstream reports match without manual mapping.
Core ecommerce events and their key parameters
| Event | When it fires | Key parameters |
|---|---|---|
| view_item event | Product page loads | currency, value, items |
| add_to_cart event | Item added to cart | currency, value, items |
| begin_checkout event | Checkout starts | currency, value, items |
| purchase event | Order confirmed | transaction_id, currency, value, items |
Naming follows the GA4 ecommerce schema so the same event feeds GA4, Google Ads, and any other platform without remapping.
07 / 15
Could GTM double-count your traffic and sales?
Yes, and the most common cause is running GTM's Google Analytics tag alongside Shopify's built-in Google Analytics integration.
Duplicate tracking means the same session or conversion is recorded twice because two measurement paths are active at once. Shopify's own warning is clear: adding a Google Analytics tag in GTM on top of the built-in Google Analytics integration can cause duplicate tracking.
The telltale signs are sessions roughly doubling, purchases reported twice, and inflated conversion counts. Pick one owner for the GA4 tag, then remove the other path before you publish.
Compare GA4 sessions against Shopify Analytics
Line up the same date range in both reports. If GA4 sessions land near double Shopify's, two paths are likely firing.
Check for two page_view or purchase events per session
Use GTM Preview and Tag Assistant to watch the event stream. One page view or purchase firing twice points to a duplicated tag.
Confirm whether the built-in Google Analytics integration is still connected
Shopify warns that this connection plus a GA tag in GTM can duplicate tracking. Decide which path owns GA4.
Remove the losing tag, then republish
Delete the GA4 tag from GTM or disconnect the built-in integration, then publish the container and re-check the counts.
08 / 15
What should you check before you go live?
Run every tag in GTM Preview mode and confirm it with Google Tag Assistant on a real test order before publishing.
GTM's Preview mode shows exactly which tags fire on which pages and events, so you can spot a trigger, the rule that tells GTM when a tag should fire, that's misconfigured before real shoppers see it. Open Preview from your GTM workspace, load your store, then walk a full test purchase in a test payment method; the purchase tag should fire exactly once on the order confirmation page.
In parallel, keep Google Tag Assistant open to confirm only one GA4 stream is receiving hits. If you see two, you have duplicate tracking, the same session or conversion recorded twice because two measurement paths are both active. Repeat the walkthrough with consent declined to confirm tags respect the shopper's choice.
Preview mode on every key page
Open GTM Preview and load your homepage, a product page, the cart, and the checkout. Confirm each expected trigger fires, and that no unexpected tag fires where it shouldn't.
One test purchase, one purchase tag
Complete a real test order using a test payment method. In Preview, the purchase event should appear once. If it appears twice, a trigger is duplicated or two tags are sending the same purchase.
Tag Assistant sees one GA4 stream
Run Google Tag Assistant alongside Preview. If it reports two GA4 streams, your built-in Shopify connection and your GTM tag are both measuring the same traffic, disable one before publishing.
Consent behavior
Re-run the walkthrough with consent declined or withdrawn. Tags that require consent should not fire. Confirm your consent banner and GTM consent settings are wired to the same categories.
No tags left in draft
In the GTM workspace, check for unsaved changes or tags still in draft. Publishing with pending edits means the live container won't match what you tested.
Rollback plan
Know how to unpublish or revert the container if something breaks after go-live. Note the previous container version so you can restore it quickly.
09 / 15
Should you use an app or set it up manually?
Manual setup gives control but needs maintenance; an app is faster to install but adds a per-transaction cost and a vendor dependency.
Manual setup keeps you in charge of the container, the tags, and the data layer, that structured JavaScript object that passes order value, items, and currency to GTM, so you can debug any broken event yourself. The trade-off is upkeep: every theme change or tracking update lands on your plate.
An app installs faster and hands you a working setup, but you pay per transaction and inherit the vendor's tag choices. A custom web pixel, Shopify's current way to run tracking code on checkout and thank-you pages, sits underneath either route.
Manual setup
- You own every tag and trigger, so debugging is direct
- No per-transaction fee
- You maintain the container as themes and tracking needs change
- Needs someone who can read the data layer
Stores with in-house analytics capacity and steady order volume.
Third-party GTM app
- Live in minutes, no theme edits
- Vendor handles Shopify-side updates
- Often priced per transaction, which scales with sales
- You inherit the vendor's tag and event choices
Teams without developer time, once pricing and reviews check out.
Going further
App due diligence
Method
How to read an app's pricing model and reviews
A per-transaction app and a thin review profile both raise your long-term risk, not just your bill.
Open the app's Shopify listing and read the pricing section word by word. A flat monthly fee is predictable; a charge per order grows silently with your volume, and the listing is the only place that number lives.
Then look at the review count, not just the star rating. A handful of five-star reviews is thin evidence: small samples swing easily, so treat low counts as a signal to test harder before committing.
- Pricing modelConfirm whether billing is flat or per transaction, and run the per-order figure against your monthly order count.
- Review countWeigh how many reviews exist, not only the average score; a low count is weak evidence.
- Review recencyCheck whether recent reviews mention breakage after Shopify or theme updates.
- Exit costAsk how you retrieve or rebuild your tags if you leave the app.
10 / 15
GTM via custom web pixel: how it works and who it is for
A custom web pixel loads GTM outside your theme (Shopify documents it as an advanced tutorial it does not support itself), so tags survive theme changes and checkout events reach your container through Shopify's own event stream.
You add the pixel through Shopify's customer events settings, and it runs in a sandboxed environment where it can subscribe to standard ecommerce events and push them into your GTM container. Because it sits in Shopify's checkout extensions rather than your Liquid files, a theme update or redesign will not wipe it out.
GTM via custom web pixel
A Shopify-managed pixel that loads your GTM container and forwards storefront and checkout events into it, independent of your theme code.
- Where it lives
- Shopify customer events settings, not your theme files
- Setup effort
- Low to moderate: one app or custom pixel, then configure events in GTM
- Survives theme changes
- Yes, decoupled from Liquid templates
- Checkout data
- Standard ecommerce events available; custom fields depend on what the pixel subscribes to
- Maintenance
- You own the pixel code; Shopify owns the runtime
- Cost
- No Shopify fee for the pixel itself; paid third-party pixels exist
- Keeps tags alive through theme redesigns and app changes
- Reaches checkout steps that theme snippets often miss
- Runs in a sandboxed environment Shopify controls and updates
- Requires a developer or a prebuilt pixel app to write and maintain the code
- Limited to the events Shopify exposes, arbitrary DOM scraping is not possible
- Debugging is less direct than inspecting a page in the browser
Pick this route when you want GTM tags that outlive theme edits and you can commit to maintaining a small piece of pixel code or paying for an app that does it for you.
11 / 15
GTM via theme snippet: how it works and who it is for
A theme snippet drops GTM's container code directly into your Shopify theme's liquid files, giving you full control over tag firing but requiring theme edits on every update.
Pasting the container snippet into theme.liquid loads GTM on every storefront page, since the snippet sits in the shared layout file that wraps all templates. You control exactly where it appears by choosing the right liquid file and insertion point.
GTM via theme snippet
Manual insertion of the GTM container code into your Shopify theme's liquid files, giving direct control over where and how the tag loads.
- Install method
- Manual code edit in theme.liquid or a dedicated snippet file
- Technical effort
- Moderate, requires comfort reading liquid templates and knowing where head and body tags sit
- Coverage
- Storefront pages only; checkout is governed by Shopify's checkout extensibility rules
- Update dependency
- Theme updates can overwrite or displace the snippet; reapply after every theme change
- No recurring app fee or third-party dependency
- Full control over tag placement and load order
- Works with any Shopify plan that allows theme code editing
- Breaks silently when you switch or update themes
- No built-in consent or data layer logic, you build it yourself
- Cannot reach checkout pages without a separate web pixel
Best for store owners comfortable editing theme files who want zero app overhead and direct control over tag placement.
12 / 15
Third-party GTM app: how it works and who it is for
A third-party GTM app is a Shopify app that installs Google Tag Manager for you and keeps your tags firing through platform changes, but it adds a monthly or per-transaction fee and a layer you no longer fully control.
A third-party GTM app connects your store to Google Tag Manager through Shopify's supported integration points, so you do not touch theme code or web pixel settings yourself. The app handles the container snippet, passes ecommerce events to your tags, and often validates your dataLayer as orders come in.
Third-party GTM app
A Shopify app that installs and maintains Google Tag Manager for you, handling the container snippet and ecommerce event passing without theme edits.
- Typical cost model
- Free install with a per-transaction charge or a flat monthly subscription, varies by vendor
- Setup time
- 15–60 minutes, depending on the app's onboarding flow
- Maintenance
- Vendor updates the app when Shopify changes its integration points
- Concrete example
- GTManager is free to install but charges $0.25 per transaction billed in USD, and holds a 4.1 rating from 16 reviews (apps.shopify.com, as of November 2026), a thin review base and a per-transaction model to weigh before committing.
- No theme code or web pixel editing required
- Vendor handles platform changes that would break a manual setup
- Often includes a dataLayer preview or event validation screen
- Recurring cost scales with order volume on per-transaction plans
- You depend on the vendor for updates and support response times
- Thin review counts on some apps make reliability harder to gauge
Best for store owners who want GTM working quickly and are willing to pay a per-transaction or monthly fee rather than maintain the integration themselves.
13 / 15
What do you need to decide, and when?
Decide within the next week whether GTM is worth maintaining for your store, and whether you set it up in-house or hire help.
Give yourself a week to decide. If your built-in Google Analytics connection answers the questions you actually ask, stop there and revisit only when an ad platform forces the issue. If you proceed, treat the install, the QA pass, and the publish date as three separate calendar items, not one afternoon.
Before any tag fires on a live shopper, settle consent and privacy. In the US there is no single federal consent statute, so your obligations come from state privacy laws and each ad platform's own terms. If you cannot block a full day for testing and cleanup, bring in a contractor.
Stop with built-in reporting
You keep the native Google Analytics connection and add nothing else. This suits stores whose questions are covered by standard traffic and sales reports.
- Effort
- No new setup
- Maintenance
- None beyond your current reports
Key pointRevisit only when an ad platform or a partner asks for data the built-in reports cannot produce.
Proceed with an in-house GTM setup
You own the container, the tags, and the QA pass. This suits a store with someone who can read tag configuration and debug a firing trigger.
- Time to reserve
- One full day for testing and cleanup
- Verification
- GTM Preview mode plus Tag Assistant
Key pointBlock the install, the QA pass, and the publish date as separate entries on the calendar.
Hire a contractor
An outside specialist builds and maintains the container. This suits teams without a spare day or without anyone comfortable debugging tags.
- Choose on
- Review quality and pricing model
- Pricing models
- One-off build or monthly retainer
Key pointAsk for the GTM container export and a written list of what each tag fires on before you approve the publish.
14 / 15
Frequently asked questions
15 / 15










