I’ve already added my Google Tag Manager and Google Analytics code inside the of my theme.liquid file, and it works perfectly across the entire site — except for the order status (thank you) page.
I understand that Shopify allows custom scripts in the Checkout > Additional Scripts section, but those scripts are injected into the , not the . For proper tracking and performance, I need the GTM script to be placed specifically in the of the order status page.
Important Notes:
-
Im using Shopify Grow plan
-
I’ve confirmed the GTM code is correctly placed in theme.liquid, but it’s not reflected on the order status page.
-
I’m looking for a solution that lets me inject the GTM script into the of the order status page.
Is there any workaround for non-Plus stores to accomplish this? Or is this only possible with Shopify Plus?
Thanks in advance!
Hello @zeenik
Have you tried Pixel?
Go to Settings → Customer Events → Manage Pixels → Add Custom Pixel
For the thank you page or checkout page, Shopify provides Pixel to load your script on these pages. Please try pixel, it will work for you.
Do you mean all the codes added in Customer events go in the head of all pages?
When you add a Custom Pixel via Settings → Customer Events in Shopify, the code you provide is loaded in a safe and controlled way by Shopify’s Pixel API. While Shopify doesn’t give us direct access on the order status page (or checkout) for non-Plus plans, the Custom Pixel events are fired early in the page load process — effectively before the body content — making it suitable for most tracking needs, including GTM.
Technically, it won’t inject your full GTM container snippet directly into the like in theme.liquid, but your pixel script will run on the Order Status (thank you) page as expected, and you can trigger your tracking events there.
If you specifically need GTM for additional tags (like conversion events or remarketing), you can set those up inside your GTM container triggered by this pixel event too.
Unfortunately, only Shopify Plus stores allow modifying the of checkout and order status pages directly via shopify checkout extension.
For clarification
Should I remove all the head snippets from theme.liquid and add them to the custom pixel? only leaving the snippets that are needed to be in body.
or should I keep them?
I have added GTM in Custom Pixel but when checked on the source code of the order status and home page I can’t find it.
Thanks for clarifying — let’s break it down:
-
Keep your GTM code in the theme.liquid for all public-facing pages like the homepage, collection pages, product pages, etc.
-
Add a separate implementation via Custom Pixel for checkout and order status pages because those pages don’t render the theme.liquid like checkout or Thank you page
You can confirm it’s working through Shopify Analytics → Customer Events logs, your GTM debug mode, or real-time events. Also, you can use any Chrome extension(like Tag Assistant) to check the trigger.