Google Tag Manager/Shopify additional scripts not firing purchase event tracking

I’ve recently been going a GTM setup on Shopify and all has been going well apart from the purchase tracking. I’m finding that every other event tracks perfectly in GAUA, GA4 and Google Ads (Add to carts, initiate checkouts, etc) but whenever somebody completes a transaction there’s no record of it.

I’ve done testing myself by firing purchases in different ways:

  • With and without cookies
  • Through GTM debugger
  • On mobile data
  • In incognito

and every single time my own purchases track and the Datalayer fires & fills perfectly. However it seems whenever there’s a real customer order it doesn’t track. I can see that the GTM container must be active, as in GAUA I can see that they have landed on the order confirmation page at the end of their journey, it just seems as though the datalayer never fills.

Here’s my DataLayer code that is in Shopify’s additional checkout scripts (not a plus store):


Any insight is appreciated!

Place the Analytics or GTM code inside the


Everything I’ve read so far has suggested this isn’t possible without Shopify Plus/access to checkout.liquid and that the only way to track purchases is via Checkout > Shopify Additional Scripts. If I place it within the of my theme.liquid it won’t be on the order confirmation page.

Could I also ask why you prefer to use the gtag instead of just datalayer for google tag manager?

You place it in the header.liquid and it should work. It reads the thank-you page.

Whichever the customer perfers I use :slightly_smiling_face:

Sorry but could you explain further? I don’t think this is the case. The GTM tag I currently have in the doesn’t pull in on the thank you page, only the one I have in additional scripts shows in the inspect. Other scripts that I also have in the unrelated to this issue don’t pull in on the thank you page so how would it be able to track a user reaching this page if it’s not there? All documentation I’ve read insists this has to go into the additional checkout scripts.

You put the GTAG or GTM inside the wrapper and the additional script (in my prev. post) inside the additional scripts. And it tracks the purchases.

My GTM code is in both the (for other event tracking like add to cart, product views etc) and is also in the additional scripts. The code in my original post is in the additional scripts. I unfortunately cannot use the code you provided as like I said I am going through Google Tag Manager.

My issue isn’t that I don’t know where to put the code, my issue is that my datalayer doesn’t fire when a user reaches order confirmation. Thank you for your help but I don’t think this is my issue.

Emma - Did you solve this? I’m having a similar problem for a client who doesnt have access to the checkout.liquid file - so we’ve put GTM code in the theme.liquid but the thank you page isn’t pinging the Google Tag Manager Tag and not registering any conversions

Hi Emma, same problem here!
Did you find any solutions for that?

Emma, my problem seems identical to yours. Have you found a solution?