There have been rumors circulating about the latest version of Shopify checkout not supporting Google Tag Manager (GTM). Is Shopify cutting off support for GTM on the checkout completely?
This might have been the biggest announcement from Shopify in 2022, but also the most overlooked.
If you’re upgrading to Shopify’s “checkout extensibility”, you might have noticed that Littledata works seamlessly with Shopify checkout extensibility while other apps end up missing data. So let me explain why that is, and how we built Littledata to be future-proof.
We have been working with Shopify tracking since the beginning at Littledata and have followed these updates closely. So let me unpack what is and is not changing for GTM tracking on the new Shopify checkout.
What is Google Tag Manager?
Many Shopify stores use Google Tag Manager (GTM) to deploy marketing ‘tags’ across their web pages, without the need to directly edit the store theme.The free tool developed by Google has shot to popularity ahead of paid rivals such as Tealium and Heap.
GTM makes it easy for these stores to track pageviews and on-site events in Google Analytics, Facebook Ads and other analytics and marketing platforms, but capturing checkout steps and transactions (orders) is more difficult.
Until recently, Shopify Plus stores had the ability to also add GTM to the checkout pages, by adding the GTM container to the theme checkout.liquid file. This allowed tracking of checkout steps to power, for example, abandoned checkout retargeting via email or Facebook Ads. Even though there are automated solutions that track checkout steps accurately and securely without the need for GTM, some merchants and agencies still do this manually via GTM.
What is changing on the Shopify checkout?
Starting in November 2022, Shopify has been gradually rolling out a new checkout which limits Google Tag Manager in the checkout for Shopify Plus stores.
The new checkout will remove the ability for Plus stores to add scripts via checkout.liquid. The checkout.liquid file will still be present but be ignored. Shopify has announced the official end date for checkout.liquid as August 13, 2024.
Shopify will no longer be allowing Google Tag Manager in the checkout.liquid file
Stores will get the ability to modify aspects of the checkout experience from within Shopify admin, but not the ability to add GTM to checkout.liquid.
This is not a temporary measure; it’s a long term solution to increase security in the checkout.
You can still track completed orders on the order status (thank you) page via the Checkout Order Status Script section, but this client-side tracking is increasingly unreliable.
Why didn’t merchants get a headsup?
To be fair to Shopify, they have flagged extra scripts on the checkout as a security risk for a few years. They have been trying to close the Additional Scripts loophole since 2020, and have added a browser console warning about third-party scripts being blocked on the checkout.
Shopify’s solution is Web Pixels, to allow tracking of checkout pages without access to the checkout pages – but this solution has some limitations.
How to replace GTM on the Shopify checkout
If you run GTM on a Shopify Plus checkout you need to find an alternative to tracking the checkout steps. And you need to do so ASAP.
You have three options I’m aware of:
- Use Littledata’s data layer, which automatically tracks Shopify checkout steps server-side to improve both page performance and data accuracy.
- Use an app that integrates with Shopify’s Web Pixel API, which is a promising solution but currently only supports client-side tracking.
- Load GTM via a custom pixel on the checkout.
Options 1 and 2 will provide an out the box solution, though at this time only option 1 can provide complete tracking across the funnel. Option 1 also allows for sending both client-side and server-side data back to Google Analytics (GA4) as well as destinations like Meta (for Facebook Ads and Instagram Ads) and TikTok. Option 3 will require development work to build a data layer and test all the tags — not to mention maintaining them over time.
Littledata tracks Shopify checkout steps server-side, without the need for GTM
The limitations of using a custom pixel to load GTM on the checkout
A Shopify custom pixel allows tracking codes (including GTM) to run in a sandbox, so it’s can’t access the main context of the page. This is a deliberate security constraint and Shopify warns of limitations:
- Can’t track click or scroll events
- Can’t get information from the DOM
- Only a subset of window / document context is available
On the storefront, before the checkout, you can work around this by publishing custom events from your own code; but on the checkout you are limited to Shopify’s standard checkout events and checkout context.
And Shopify also warns of the security and speed risks of running custom pixels.
All this makes the process of migrating current GTM tags to work on the new checkout quite time consuming. Is now the time to stop investing in GTM maintenance and pick an off the shelf solution?
Why is Shopify restricting usage of GTM?
GTM is loved by marketers for its ability to bypass developer blockers to get marketing tags live, but it is hated in equal measure by web security experts for the same ability to bypass security. With great deployment power should come great responsibility, but GTM allows a non-technical user to inject unknown JavaScript into all web pages on a site with minimal scrutiny.
On pre-checkout pages of a store the worst impact is container bloat – multiple tracking tags from different vendors slow down the user experience for customers.
The antidote to bloated GTM containers is to push most of the tracking server-side. Server-side tracking allows for faster page loads while improving data accuracy.
But adding GTM to the checkout pages presents a much greater risk. As well as potentially interrupting a business-critical path to payment, rogue scripts loaded from GTM can scrape credit card details from the page and facilitate credit card fraud.
The final straw for Shopify seems to have come in August when Shopify’s checkout was out of action globally for the best part of a day due to a conflict with GTM.
I can’t believe more people aren’t talking about the @shopify checkout issue. 12 hours and massive stores are still affected with no announcement from shopify
— Matt Schroeder | 3PL Operator 📦 (@SchroedsBiz) August 31, 2022
Here’s a fix, if your store is affected pic.twitter.com/rkvr72AlBP
With over $500M a day of GMV processed through Shopify checkout in Q3 alone, that is just too big an operational risk for Shopify to bear.
Is GTM safe on the rest of my Shopify store?
Yes, I can’t see why or how Shopify would restrict third-party scripts — including GTM — on the pre-checkout storefront. Shopify allows stores to add any functionality to the storefront as they want, even if that does make the pages load more slowly.
That said, two advances in web tracking technology may make GTM redundant for your store:
- Enhanced Measurement in Google Analytics. This allows stores to track clicks, outbound links, video engagement and page scrolling without adding any code to the storefront. These were all events that required GTM to trigger previously. And it’s completely compatible with Littledata’s Google Analytics 4 connection.
- Server-side tracking across the customer journey. Browser-based tracking via GTM is increasingly unreliable as cookies and tracking scripts get blocked. Although Google Tag manager also supports server-side containers, the setup can be fiddly and requires you to run your own server infrastructure on Google Cloud. Littledata’s out-the-box server side solution provides all the benefits of server-side with none of the maintenance.
So even if you’re quite happy with GTM – and not on Shopify Plus – I recommend you have a think about whether you really need GTM, or could find a lower maintenance solution.
Book a call with our team if you have any questions. We’ve advised thousands of brands on data strategy over the years, and many are moving away from GTM.