Menu
Shopify / Marketing / Shopify Tutorials

How To Install Google Tag Manager into Shopify & Checkout Pages

Tag manager shopify checkout
Published 6 February 2021

Last updated on 3 August 2021

Method That Works 2021

Shopify have made it difficult for users to install Google Tag Manager because they only allow it to be completely installed when you have a Shopify Plus membership, which costs $2000+ per month. Extreme!

I kept running into LOADS of tutorials and blogs explaining how to get it working but none of them methods work anymore, or make any sense. I thought I would share my experience below on how I got it working without having a Shopify Plus membership.


Important note: We have had a few reports this method has not worked for some people. We aren’t sure if Shopify may have blocked this method.


My goal: Get Tag Manager working on Shopify Checkout pages

So how do you install Google Tag Manager then? After researching myself and trying to figure out a way, I stumbled upon this method that worked:

Take note, I had already installed Google Analytics 4, TikTok pixel and Reddit pixel into my Google Tag Manager (GTM). This way I knew, once GTM was working on the checkout pages on my store, I would see traffic coming through the Analytics pretty quickly.

Step 1

Go to your Shopify store and click on ‘Online Store‘, then the ‘Themes‘ section should load instantly. Click on ‘Options‘ and click ‘Edit Code‘. You will then need to open the ‘theme.liquid‘ file. This is where your tag manager code will be placed so all pages on your store can be tracked, apart from Checkout pages due to Shopify’s security.

Step 2

Go to your Google Tag Manager account and set it up. It’s very straight forward. Once you get to your dashboard, you will need to click on your tag to show your installation codes as shown below below:

Screenshot 2021 02 06 163751

Step 3

Copy the first box of code and go back to your Shopify store. You will need to paste it directly below the <head> tag as Google Tag Manager suggests.

Step 4

Go back to Google Tag Manager and get the code from the second box. Copy it and go back to Shopify and paste it below the <body tag as shown below.

Step 5

Go back to Google Tag Manager and copy the code from the first box again. Go back to Shopify and go to ‘Settings‘, then go to ‘Checkout‘, then scroll down until you see the ‘Additional Scripts‘ section. Paste the code inside this box with the script tags opening and closing, so it looks like this:

Screenshot 2021 02 06 190530

Full Video Walkthrough

New video showing a slightly different method

Success!

There you have it! Using this method, I have successfully started tracking checkout conversions using all my pixels in Google Tag Manager. This has worked well for me but I am curious if Shopify will block this method like they have done in the past with other methods.

If this method doesn’t work well for you, drop me a comment below or contact me and we can update this article accordingly.

About Author

Will is a professional Ecommerce Shopify expert (7 years experience) & a professional Filmmaker/Video Editor (17 years experience). Now living between the Isle of Man & Brighton, UK. Highly experienced in Premiere Pro, DaVinci Resolve, After Effects, Shopify, WordPress & SEO. Owner of Teckers, Bounce Color, Stunt Camera Crew & more.