How to setup and use Google Tag Manager in Shopify

This informative and concise article is a short guide to Google Tag Manager, how to install it, and its application to Shopify.
Gintaras Baltusevičius

Feb 25 2021 5 min read

Table of Contents

    Google Tag Manager - Shopify

    If you run an e-commerce website on the very powerful and popular e-commerce platform, Shopify, then you have heard of Google Tag Manager (GTM). For many online store owners, the software is confusing, and not understanding this powerful tool's function prevents them from implementing it on their checkout pages and more. 

    What is Google Tag Manager?

    Google Tag Manager is a tag management system or TMS. It allows you to easily update measurement codes and related code snippets collectively referred to as tags on an online store or mobile application.

    The interesting aspect of the software is that when a small code snippet of the Tag Manager has been added to your website, you can easily and safely implement functionalities like Analytics and measurement tag configurations. All of these can be done from a web-based user interface. Google Tag Manager is free software, and it is essential to functionalities like analytics, digital marketing, email marketing, and more.

    What does Google Tag Manager do?

    Essentially, when you add Google Tag manager on your online e-commerce platform, it sets up communication with the Tag Manager servers. The Tag Manager allows you to set up tags with its web-based user interface and establish triggers that cause your tags to actuate when specific events occur.

    The Tag Manager allows you to create variables that can be used to automate your tag configurations while simplifying them. The collection of tags, triggers, variables, and other related configurations installed on a website or mobile app is referred to as a container or container code. Using Google Tag Manager Container code, you can easily replace all the other manually coded tags on your online store or application. Some of the manually coded tags include Google Ads, Floodlight, Google Analytics, and 3rd party tags. 

    Does Google Tag Manager include Google Analytics?

    Many online store owners, and even programmers, sometimes confuse Google Tag Manager with Google analytics. Google Analytics (GA) and Manager are two separate tools designed to work together. If you have installed Google Tag Manager, you still need Analytics. Its function is to allow users to manage the tags on their websites, allowing them to implement tools like Google Analytics and more easily. So, yes, the Tag Manager includes the functionality that easily manages Google Analytics tags.

    Here is a quick explanation of how Google Analytics works:

    Google Analytics works by tracking and storing data about your page, then generating reports about your website with the tracked data. The only way to implement Google Analytics on your e-commerce page is with the help of tracking code. Tracking code is essentially a custom JavaScript code snippet that must be placed on every page of your website.

    The JavaScript code snippet is what sends the data corresponding to a certain interaction to Analytics. However, this JavaScript code is limited in functionality, as you require custom JavaScript code to track specific user interactions on your website. Therefore, instead of asking a developer to set up custom marketing tags on your websites (which might take weeks or months), you use Google Tag Manager instead. It allows the integration of custom code snippets (tags) using a web-based user interface.

    How do I add Google Tag Manager to Shopify checkout?

    Note: Google Tag Assistant is only available to stores on the Shopify Plus plan, and theme files are important.

    Adding Google Tag Manager to your Shopify store is a powerful way to enhance sales and effectively track several tags on your Shopify website using your Google Analytics account.

    Here is a mini-guide on how to add Google Tag Manager to your Shopify page using theme files.

    What to consider before using Google Tag Manager on your Shopify store.

    Before considering using Google Tag Manager, here are a few things to consider:

    • Ensure that you have access to the checkout.liquid file of your website. Suppose you do not already have access to the checkout.liquid file, contact Shopify Plus Support for access.
    • Instead of using Google Analytics and Facebook Pixel with Google Tag Manager, make use of Shopify’s integration instead.
    • Ensure that you copy the code snippets provided by Google Tag Manager into your theme.liquid file and your checkout.liquid theme file.

    Adding Google Tag Manager code to your Shopify theme

    If this is your first time installing Google Tag Manager, use the installation steps on the Google Tag Manager page.

    Below is a quick guide to adding Google Tag Assistant to your e-commerce page:

    1. Install Google Tag Manager, and retrieve the code snippets you will copy and paste into your Shopify store. Since Shopify runs on templates, all you need to do is copy the Google Tag Manager code snippets into the theme.liquid file and checkout.liquid file.
    2. Click Online Store, and then Themes in your Shopify Admin.
    3. Click Edit Code in the Theme drop-down.
    4. Copy the first code snippet from Google Tag Manager into the <head> tags of your theme.liquid and checkout.liquid code.     
    5. Copy the second code snippet from Google Tag Assistant into the <body> tags of the theme.liquid and checkout.liquid code.
    6. Click Save in your Shopify Admin.
    7. In the Google Tag Manager, continue with installing Google Tag Manager. Always remember to click save.

    When you are prompted to add tags, do not add the following tags:

    • Classic Google Analytics for Google Analytics.
    • Facebook Pixel.
    • Universal Analytics for Google Analytics

    Verify the installed Google Tag Manager

    To verify the successful installation of Google Tag Manager, you can either use:

    Note: For a more detailed installation process, check out the Shopify Help center on the Google Tag Manager page.

    Final Notes

    To fully install Google Tag Manager on your Shopify checkout pages, make sure you understand how the system works and how the Google Manager code affects your Analytics, and more. While this guide is short, we hope it was informative enough to get you started on increasing store click with Google Tag Manager. 


    How do I use Shopify with Google Tag Manager?

    To use Shopify with Google Tag Manager, you need to be on a Shopify Plus plan. To integrate Google Tag Manager with Shopify, check out Shopify’s instructions on the Google Tag Manager Shopify website.

    Published on Feb 25 2021

    Gintaras is an experienced marketing professional who is always eager to explore the most up-to-date issues in data marketing. He is always in search of new and unexplored angles to share with his readers.

    Read more awesome articles

    Enter your email and get curated content straight to your inbox!

    Only the best content & no spam. Pinky promise.
    By submitting this form, you agree to our Privacy policy