Shopify Google Tag Manager Tracking Migration
A Comprehensive Guide

Are you looking for the best way to integrate Google Tag Manager (GTM) into your Shopify store? Wondering how to install GTM on a Shopify store or how to set up Google conversion tracking on Shopify? You’re not alone. In recent years, Shopify has introduced new “Custom Pixels” that fundamentally change how tracking scripts are managed and executed.

In this article, we’ll walk you through the key points of this Shopify Pixel migration, from why it’s happening to how it impacts your existing GTM setup—complete with step-by-step instructions on implementing Shopify GTM tracking in 2025 and beyond.

Introduction to Shopify’s New Tracking Requirements

Shopify has long been a go-to platform for eCommerce entrepreneurs due to its user-friendly interface and robust app ecosystem. For tracking and analytics, many store owners rely on Google Tag Manager (GTM), which allows for centralized management of tags, scripts, and pixels.

Traditionally, tracking codes—such as the Facebook Pixel or Google Ads tags—were often embedded directly into the theme or installed via separate apps. But with the emergence of Shopify Custom Pixels, the process is evolving.

Shopify Google Tag Manager Installation Steps
Old GTM IntegrationNew GTM Integration (Required)
Will work after August 2025
Meets the PCI SSC security standards
No separate install for the checkout page
Full check-out tracking without Shopify Plus
Can log errors to the browser console
Preview Mode GTM

Why does Shopify Require Custom Pixels?

Enhanced Security and Privacy

The main reason for the migration is that Shopify should ensure ongoing compliance with the latest Payment Card Industry Data Security Standards (set by the PCI SSC). This upgrade not only enhances your store’s security but also builds trust with your customers by protecting their sensitive payment information. With Shopify handling compliance, you can focus on growing your business with confidence, knowing that your transactions are secure and up to industry standards.

  • Verified Script Placement: Shopify’s Custom Web Pixels validate each script before it runs, reducing the risk of malicious code in your store.
  • Checkout Safeguards: By moving scripts away from direct theme or checkout.liquid edits, Shopify makes the checkout process more secure and stable—especially for non-Plus stores.
  • Granular Data Control: You decide exactly which data to track and share with external services, helping you stay compliant with GDPR, CCPA, and future privacy standards.
Without migrating, your conversion tracking will be lost in 2025

What Tracking Functionalities Will Be Deprecated?

  • Theme-Liquid Script Embedding: Sticking GTM or other pixels directly into theme.liquid, checkout.liquid (for Plus stores), or similar files will be discouraged and may eventually lose support.
  • Custom Checkout Scripts: Custom checkout scripts will also be deprecated. This change is intended to reduce security vulnerabilities and improve stability, ensuring a consistent checkout experience for all Shopify merchants.
  • Old Pixel Setup: Some older pixel integrations may no longer work seamlessly once Shopify fully transitions to the new Pixel standards.
  • Unmanaged Third-Party Scripts: Apps that inject scripts without following Shopify’s new guidelines might cause conflicts or degrade site performance.

How to Install or Migrate GTM on a Shopify Store?

Begin by cataloging every measurement tool you currently use—Google Ads, Meta Pixel, Bing, Pinterest, and more—along with each one’s conversion IDs, labels, and tag names. This complete overview helps you determine which tags are indispensable, which ones you can add to improve your analytics, and which scripts are no longer needed and can be safely retired.

2. Create a GTM Container or Workspace

In case you don’t have one already, set up a new container in Google Tag Manager. This container will house all your tags for Shopify GTM tracking. If you already have a container, create a new GTM Workspace. In most cases, it is beneficial to start with a clean container.

3: Add GTM as a Custom Pixel in Customer Events

In your Shopify admin, navigate to Settings > Apps and sales channels > Custom Pixels. Create a new pixel for GTM, pasting your container snippet (the code normally placed in <head> and <body>).

Move your Google Ads, GA4, or any other tracking tags into GTM. Align them with the new custom pixel environment.

Avoid double-counting and inconsistent data by removing any legacy GTM installations—whether in your theme’s <head> or <body> sections, the checkout page, or even plugins.

6. Test Thoroughly

Validate your tracking setup to confirm your events fire correctly. You can use the console logging of your browser to validate and debug your measurements.

7. Publish and Monitor

Once satisfied with testing, publish your changes. Keep a close eye on analytics platforms to ensure data is collected properly.

📌 Reading Tip: The 5 most common mistakes in GTM and how to solve them.

Impact on Existing GTM Setup

The switch to Shopify Custom Pixels brings several important changes to your Shopify Google Tag Manager integration. From click tracking to form submissions and data layer adjustments, you’ll likely need to refine your triggers and variables to maintain accurate tracking. Additionally, consent mode and cookie banner scripts may require updates to stay compliant with new privacy guidelines. Below is a quick overview of the key areas to watch.

Google Tag Manager Shopify Common Issues and Checks

Our Google Tag Manager experts are happy to help you configure or migrate your measurements.

Google Analytics 4
Google Ads
Microsoft (Bing) Ads
Meta (Facebook) Ads
Snapchat Ads
TikTok Ads
Pinterest Ads
LinkedIn Ads
Twitter (X) Ads
Hotjar
Microsoft Clarity
AdCalls
Klaviyo
Billy Grace
DV360
Sovendus
Salesforce
Hubspot
VWO
Cookiebot
Custom pixels and more

Shopify GTM Custom Pixel Errors & FAQ

Preview Mode GTM Not Working Shopify

If your GTM preview mode isn’t functioning after adding a Custom Pixel in Shopify, it’s because the pixel loads within a sandboxed iFrame. This secure iFrame environment blocks the GTM preview/debug script from running. As a result, GTM’s preview and debug features won’t display tracking events for Custom Pixels—making it appear as though they aren’t firing, even when they are.

In case your published container isn’t receiving any data, there could be an issue with how GTM is installed or configured.

Shopify Custom Pixel – Google Tag Manager Not Initializing

If it looks like Google Tag Manager never initializes after adding a Custom Pixel, the culprit is Shopify’s sandboxed iFrame. Because the pixel loads within this secure iFrame, GTM’s scripts can’t run as usual. This makes the container appear uninitialized—even though the pixel may still be active in the background.

In case your published container isn’t receiving any data, there could be an issue with how GTM is installed or configured.

How to validate Google Tag Manager Custom Pixel Without Preview Mode?

If you’ve integrated a cookie consent solution like Cookiebot, CookieYes, or OneTrust via Shopify’s Custom Pixel and notice that the cookie banner isn’t appearing, it’s likely due to the sandboxed iFrame environment. This secure container prevents certain scripts—like external cookie banners—from functioning as they typically would, resulting in the banner not displaying on your storefront.

Action required: Migrate your Google & Meta pixels to apps in the next 30 days

While Shopify offers the option to set up separate Custom Pixels per app, we strongly advise centralizing all of your store’s tracking in a single Google Tag Manager (GTM) container, implemented as one Custom Pixel. This approach provides several key benefits:

  1. Streamlined Tag Management
    Instead of juggling multiple pixels for Google Analytics, Meta, and other platforms, you manage and update all your tags in GTM. This consolidation reduces the risk of duplicate tracking, simplifies tag deployment, and makes future modifications far more straightforward.
  2. Unified Consent Handling
    Centralizing tags in GTM allows you to manage user consent in one place. This is particularly important if you’re required to comply with privacy regulations, as it helps maintain consistent consent settings across your entire store.
  3. Improved Performance
    Multiple pixels can increase page-load times and sometimes conflict. By combining them under a single GTM Custom Pixel, you reduce the number of scripts running on your store, which typically leads to faster site performance and a better user experience.
  4. Easier Maintenance and Scalability
    When you rely on separate Custom Pixels per app, keeping everything in sync can become a headache—especially as your marketing stack grows. A single GTM container is easier to troubleshoot and expand, ensuring your tracking infrastructure remains future-proof.

Overall, deploying GTM as a single Custom Pixel offers a cleaner, more efficient way to manage, update, and optimize your store’s tracking. This approach not only enhances performance but also makes it simpler to handle evolving privacy regulations and any new tools you decide to integrate in the future.

What is the Deadline for the Shopify GTM Custom Pixel Migration?

In February 2023, Shopify announced the deprecation of checkout.liquid as part of our transition to a new foundation for checkout and accounts. This new system is designed to be more secure, upgrade-safe, and customizable through apps.

Required Upgrade Timeline

  • August 13, 2024: Deadline to upgrade your Information, Shipping, and Payment pages.
  • January 6, 2025: Automatic upgrades will begin. Any customizations made to the Information, Shipping, and Payment pages using checkout.liquid will no longer be supported and will be lost.
  • August 28, 2025: Deadline to upgrade your Thank You and Order Status pages, including updates to apps that rely on script tags and additional scripts.

For shops that miss the August 13, 2024 deadline for upgrading the Information, Shipping, and Payment pages, please refer to the Impact of Missing the Deadline for further guidance.

Other challenges

Don’t trust your data? Discover our Google Tag Manager audit.

Ready to Upgrade Your Shopify Tracking?


Optimal data collection is the foundation of every data strategy. Want to take your data to the next level with our Google Tag Manager specialists?

Or would you like to discuss other data challenges? We are happy to have a no-obligation conversation about how we can help.

Scroll to Top