How to install Google Tag Manager to Shopify Store

What is Google Tag Manager? Google Tag Manager is a free tool that allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on Store (or mobile app) without always having to edit the code of the website.

What’s the goal? Install Google Tag Manager on Shopify Store.

Why does it matter? Google Tag Manager makes it easier for marketers to implement tags or tracking pixels without having to rely on web developers to do it for them.

What’s the result? Successfully launch Google Tag Manager on Store.

When do you do this? After you set up Store, but also after every theme change.

Any special requirements? You should have Google Analytics installed on Shopify Store. Check our SOP061 on how to do it.

️Who should do it? The person responsible for managing Store.

Where this is done? In Shopify Store Admin Panel and Google Tag Manager.

How long will this take? about 5 minutes

Now let’s place Google Tag Manager in Store.

Content Summary

Environment setup
Create a Google Tag Manager Account & Generate Tag
Adding Google Tag Manager to Shopify Store
Checking if you install Google Tag Manager correctly

Environment setup

We recommend that you use Google Chrome browser to navigate the web

Create a Google Tag Manager Account & Generate Tag

Step 1: Go to Google Tag Manager.

Step 2: Press Start for free and sign-in with Google Account (or create one).

Press Start for free and sign-in with your Google Account (or create one).

Step 3: Click on Create Account.

Click on Create Account.

Step 4: Then you should see the tab below called Add a New Account.

Then you should see the tab below called Add a New Account.

Step 5: Add a name to the account (Eg: Company Name) and choose country.

Step 6: You can decide if You want to share your data with Google (click on “?” for more info).

You can decide if You want to share your data with Google (click on “?” for more info).

Step 7: In the Container Setup tab choose a name for container (Eg: www.mysite.com).

Step 8: Choose the target platform – in case of Website it will be WEB.

Step 9: Click on Create.

Step 10: Read & Accept Google Tag Manager Terms of Service Agreement and click on Yes.

Read & Accept Google Tag Manager Terms of Service Agreement and click on Yes.

Step 11: You are now in Google Tag Manager Dashboard Tag Manager, and the next step is to go the Admin tab section.

You are now in your Google Tag Manager Dashboard Tag Manager, and the next step is to go the Admin tab section.

Step 12: Click Install Google Tag Manager.

Click Install Google Tag Manager.

Step 13: There you can see the code that you need to install on the website. Keep that page of GTM open. You will need it in the next steps.

There you can see the code that you need to install on your website.

Adding Google Tag Manager to Shopify Store

Step 14: Log in to Shopify Admin Area: (Eg: yourstorename.com/admin)

Step 15: Choose Preferences from the left-side menu under the Online Store section.

Choose Preferences from the left-side menu under the Online Store section.

Step 16: In the Google Analytics section click on Add custom JavaScript.

In the Google Analytics section click on Add custom JavaScript.

Step 17: Now go back to Google Tag Manager code and copy the upper code.

Step 18: Paste the code in the box that appeared in the Google Analytics section of the Shopify Admin area.

Paste the code in the box that appeared in the Google Analytics section of your Shopify Admin area.

Step 19: Click on Save at the bottom of the page.

Click on Save at the bottom of the page.

Step 20: Select Theme from the left-side menu.

Select Theme from the left-side menu.

Step 21: Here you will be able to see the selected theme for Shopify Store.

Here you will be able to see your selected theme for your Shopify Store.

Step 22: Click on Actions and select Edit code.

Click on Actions and select Edit code.

Step 23: Choose {/}theme.liquid – You will find it on the list on the left side of screen.

Choose {/}theme.liquid - You will find it on the list on the left side of your screen.

Step 24: You will be presented with selected theme code. Look for the <body part of the code. (If you are struggling with finding it, use CTRL + F combination on keyboard and type <body in the search box).

You will be presented with your selected theme code. Look for the<body part of the code.

Step 25: Go back to the GTM code. This time copy the second code.

Go back to your GTM code. This time copy the second code.

Step 26: Paste the code below the first line of the <body part of the code – like on the screenshot below.

Paste the code below the first line of the<body part of the code - like on the screenshot below.

Step 27: Click on Save in the upper right corner.

Click on Save in the upper right corner.

Checking if you install Google Tag Manager correctly

Step 31: Install Tag Assistant (by Google) Chrome Extension.

Step 32: After installation, click on the Tag Assistant icons on Chrome Browser.

After installation, click on the Tag Assistant icons on your Chrome Browser.

Step 33: Click Enable it.

Click Enable it.

Step 34: Simply open Shopify Store and run the extension. Now you should see all working tags or if they encounter any problems.

Simply open your Shopify Store and run the extension. Now you should see all your working tags or if they encounter any problems.

This is it! You Enabled Google Tag Manager for Shopify Store. You are now ready for adding more Tags & Tracking Pixels to Store. GTM will make it easier for you!