Home > Shopify Tutorials > Install Google Tag Manager on Shopify

How to install Google Tag Manager on Shopify?

Last updated: August 01, 2024
Written and researched by experts at AvadaLearn more about our methodology

By Sam Nguyen

CEO Avada Commerce

As you can see, digital marketing thrives on data and it’s essential to see how people interact with your site. Google Analytics is created to bring users a lot of the important insights you’re looking for. However, when it is used alone, it has some limitations. By tagging your site and using Google Tag Manager in conjunction with Google Analytics, somehow, users will be able to collect much more data than you can otherwise.

Google Tag Manager is well-known as a tool that is a user-friendly, web-based interface that simplifies the process of working with tags. If you find the word Google Tag Manager strange and wonder what it is and why you should use it. Then this article here is for you, we will answer some of your common questions and instruct you to install Google Tag Manager on Shopify in three ways as well.

Related Posts:

What is Google Tag Manager?

Google Tag Manager is designed as a tool that enables users to manage and create marketing tags shown on your website or your mobile app without asking you to modify the code. This is considered to be one of the most popular and widely used tag management solutions for online eCommerce stores and websites.

I will show you one case of how Google Tag Manager will work. Specifically, when people share information from one data source with another data source through Google Tag Manager. So, the Google Tag Manager will help you a lot if you own a lot of tags to manage as all of the code is stored in one place.

install google tag manager

Why use Google Tag Manager for Shopify?

Why should you use the Google Tag Manager for your Shopify store? I am going to show you some essential benefits that you should consider using Google Tag Manager right now.

  • First, your website speed can improve a lot when you install Google Tag Manager on your eCommerce site as it will provide you the flexible tag management solution to store all your analytics and marketing tags. Also, this will speed up your website by calling all external files in one go, and you can have the control to fire tags when needed as well.
  • Secondly, without modifying code on your site, you will be able to set up Google Analytics event tracking and it is not necessary to depend on a developer to implement code changes every time you set up new event tracking.
  • Thirdly, built-in tag templates for Google Analytics, Ad words, Facebook Pixel and few analytics and tracking tools, etc are all included in Google Tag Manager.
  • Fourthly, it also enables you to add other scripts on your site by using custom HTML tag without having to touch with your backend code.

3 Ways to Install Google Tag Manager on Shopify

There are three ways that you can utilize to install Google Tag Manager on Shopify. Each only takes you about 1 minute to get your work done.

1. Add Google Tag Manager to Shopify Admin

The first method is inserting Google Tag Manager to your Shopify Admin, and you will have to ensure these two main steps:

Implement in the Admin

First of all, Google Tag Manager needs to be set up in one place within the Shopify Admin to set up across the entire site, including all checkout pages.

  • Step 1. Copy your Universal Google Analytics (GA) script From your Google Analytics, navigate to Property, and then Tracking Info, then Tracking Code to copy your Universal Google Analytics (GA) script

install google tag manager

  • Step 2. Paste the Google Analytics script Next, you need to paste the Google Analytics script that you got into your Shopify Admin by going to Sales Channel, and Online Store, then Google Analytics. Don’t forget to click Save in this step.

install google tag manager

  • Step 3. Copy your Google Tag Manager snippet From your GTM admin, you need to copy your Google Tag Manager snippet. And remember it is not advised to include the opening and closing tags).

install google tag manager

  • Step 4. Paste the copied script On your Shopify Account, you need to paste the copied script by directing to Sales Channels, and then Online Store, then go for Google Analytics and Additional Google Analytics Java script. If you get your work shaped like the content below, you have succeeded.

install google tag manager

Remember not to sweat the GTM

Verify Your Google Tag Manager is Working!

To verify whether your Google Tag Manager is working, first, you need to add a new Universal Analytics tag with the Event Track Type with the All Pages trigger. Remember to save this tag.

After that, look at the big “Preview” button in the top right corner of your Google Tag Manager Workspace, click it to enable the Preview mode on your site.

Then, you should navigate to your website URL to see the Google Tag Manager debug console at the bottom of your browser. It will display the tags that have fired successfully, like the example below:

install google tag manager

When you see your successful work, you can start adding and testing more tags to your container to verify all works as you expect it to be so.

2. Install Google Tag Manager in Theme Files

This method is pretty straight forward, you should focus only on three main steps:

Step 1. Copy your Google Tag Manager script

First, you need to have your Google Tag Manager script copied into your theme.liquid near the top of your opening <head>. You should copy this:

install google tag manager

After that, simply paste into this:

install google tag manager

Step 2. Copy your Google Tag Manager noscript

First, you need to have your Google Tag Manager noscript copied into your theme.liquid near the top of your opening <body>. You should copy this:

install google tag manager

After that, simply paste into this:

install google tag manager

That’s a wrap! You are done, in case you use Shopify Plus, you’ll need to replicate this step in your checkout.liquid theme file too.

3. Using Shopify Apps

Plus, there are some Shopify apps that can cover the installation of Google Tag Manager as well as the data Layer variables needed for your Google AdWords dynamic remarketing.

Among those applications, Google Tag Manager by AVADA is one of the best that you cannot miss out on. It can help you track marketing behaviours as well as customer’s shopping behaviours in order to create effective retargeting campaigns. Besides, by using this Google Tag Manager application, your site performance will be improved significantly.

Download & Install here: https://apps.shopify.com/avada-google-tag-manager

If you want to have more choices, we also have listed out some others best Shopify Google Tag Manager Apps to recommend you to use. And all of the information on the review (including features, description, prices, links) is collected from the vendor’s website or their own published page/selling channels.

Notice when using Google Tag Manager on Shopify

  • First, Google Tag Manager is not recommended to be used to deploy the Google Analytics tag on your Shopify store. In case you want to do that and use the cross-domain tracking between your website, then Shopify will not work for you.

  • Second, Google Tag Manager is not for installing enhanced eCommerce tracking on your Shopify store as the enhanced eCommerce tracking is already built-in Shopify. This will not work even when you install enhanced eCommerce via Google Tag Manager because Shopify won’t read your data layers. I recommend you not to do that.

  • Third, you can utilize the Google Tag Manager to deploy tags other than Google Analytics and Enhanced Ecommerce, for example: ‘hotjar’ or ‘Google Ad words conversion tracking’ and many more.

Conclusion

That wraps our article today. Did you enjoy it? Did you know clearer about the way to install Google Tag Manager? I really hope you did and you have applied the method above successfully during your practicing.

If there is any troubles happening, feel free to contact us, we are always here to support you to bring you the best experience on Shopify.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.