Google Tag Manager Shopify Setup

Google Tag Manager Shopify Setup Cover
Ravi Davda Rockstar Marketing CEO

Written by Ravi

Jan 20, 2023

Share this:

Google Tag Manager is a powerful tool that allows businesses to add and manage marketing and analytics tags on their website or mobile app without requiring code changes. Such tags can be used on all kinds of websites, including e-Commerce ones using Shopify.

In this article, we’ll go over the steps required for the Google Tag Manager Shopify setup process and the benefits of using such a powerful combo.

Let’s get right to it!

What is Google Tag Manager?

Google Tag Manager Shopify Setup: What is Google Tag Manager?

Google Tag Manager is a free tool that allows businesses to add and manage marketing and analytics tags on their website or mobile app without requiring any changes to the underlying code. This can be helpful for businesses that want to track and analyse user behaviour on their website or app but don’t have the resources or expertise to do so through code.

To use Google Tag Manager, businesses must first create a container for their website and then add tags to the container. These tags can include code snippets for things like Google Analytics, Google Ads, and third-party marketing and analytics tools, like Facebook Pixel or LinkedIn Insight Tag. Once the tags are added, they can be configured and activated through the Google Tag Manager interface. We’ll go over the details of applying that process to Shopify later on.

Google Tag Manager also offers a range of features that make it easier for businesses to manage their tags, including built-in templates for common tags, the ability to test and preview tags before publishing them, and the ability to collaborate with team members.

What is Shopify?

Google Tag Manager Shopify Setup: What is Shopify?

Shopify is an e-commerce platform that allows businesses to create an online store and sell products or services to customers. It offers a plethora of features and tools to help businesses manage their online store, including the ability to manage inventory, process orders, accept payments, and handle shipping and fulfilment.

Shopify also offers a range of templates and design options to help businesses create a visually appealing and easy-to-use online store. It integrates with a variety of tools and services, including payment gateways, shipping carriers, social media platforms, and, as you’ve probably guessed, Google Tag Manager, which can make it easier for businesses to manage their online presence.

Google Tag Manager Shopify Setup explained

To use Google Tag Manager with Shopify, follow these steps:

1. Set up a Google Tag Manager account and create a container

If you don’t already have a Google Tag Manager account, create one by visiting the Google Tag Manager website and following the prompts to set up your account.

1. Set up a Google Tag Manager account

On the same page, use the Container Setup section to give your container a name, and select the type of website you want to add it to. In the case of Shopify, choose “Web.”

Create a container

2. Add the Google Tag Manager code to your Shopify store

3. Add the Google Tag Manager code to your Shopify store

Once you’ve created your container, you’ll get a couple of code snippets that you need to add to your Shopify website.

1. To do this, log in to your Shopify account. Then, go to the “Online Store” section, and click on the “Themes” tab

Online Store

2. From there, click on the “Actions” button next to your current theme and select “Edit code”

Edit code

3. Here’s what to do with the first code snippet from Google Tag Manager:

  1. Copy the code snippet
  2. Open the “theme.liquid” file in your Shopify admin
  3. Paste the snippet as high as possible within the <head>
  4. Open the “checkout.liquid” file
  5. Paste the snippet as high as possible within the <head>

4. Here’s what to do with the second code snippet from Google Tag Manager:

  1. Copy the second code snippet
  2. Open the “theme.liquid” file in your Shopify admin
  3. Paste the snippet as high as possible within the <body>
  4. Open the “checkout.liquid” file
  5. Paste the snippet as high as possible within the <body>

5. Save your changes and then click “Publish” to make them live on your website

Save your changes and then click “Publish” to make them live on your website

3. Set up and configure your tags

Once you’ve added the Google Tag Manager code to your website, you can set up and configure your tags.

  1. To do this, go back to the Google Tag Manager interface and click on the “Add a new tag” button
  2. From the list of options, select the tag you want to add (e.g. Google Analytics, Google Ads, etc.) and configure it according to your needs
  3. You can also set up triggers to determine when the tag should be activated, such as when a user views a product or completes a purchase

4. Set up triggers

As mentioned, Google Tag Manager allows you to set up triggers to fire tags based on certain conditions. Here’s how to set up such a trigger:

1. First, you must create a new trigger in GTM by clicking on the “Triggers” menu and selecting “New”

New trigger

2. In the trigger configuration, you’ll see several options for the “Trigger Type”, including “Page View”, “Click”, “Form Submission”, and “Custom Event”

trigger types
  • To set up a trigger for viewing a product, you’ll likely want to use the “Page View” trigger type. In the “Page View” configuration, you can specify the conditions that need to be met for the trigger to fire, such as the URL of the page, the DOM element, or the CSS selector
  • To set up a trigger for completing a purchase, you can use the “Form Submission” trigger type. This type of trigger fires when a form on your website is submitted. You can specify conditions such as the form ID, the form class, and the form URL
  • To set up a custom trigger for certain actions like add to cart, you can use “custom event”, which allows you to fire tags based on user interactions that don’t rely on page views or forms
  • Google Tag Manager allows you to create many other types of triggers depending on the data and analytics you want to collect

3. Once you’ve configured your triggers, you’ll need to associate them with the appropriate tags so that they fire when the conditions are met

Remember

One thing to remember here is that the specifics of setting up triggers in GTM may vary depending on your website’s implementation and the events you want to track. You may need to work with a developer to get the specific details you need to set up your triggers. Alternatively, you can use the GTM preview mode to test your triggers and see if they’re firing correctly.

5. Publish your changes, and you’re golden!

Once you have set up and configured your tags, click on the “Submit” button to publish your changes. This will make your tags live on your website and start tracking the events and metrics you have defined. To verify that Google Tag Manager is installed properly, you can use one of the following methods:

  • Preview Mode in Google Tag Manager
  • Google Tag Assistant Chrome Extension

Benefits of using Google Tag Manager with Shopify

There are several benefits to doing the Google Tag Manager Shopify setup, including:

Easily track and analyse user behaviour

Google Tag Manager allows businesses to track and analyse user behaviour on their Shopify store. Events that can be tracked include product views, add-to-cart events, and purchases. This information can be used to optimise marketing campaigns and improve the overall user experience.

Conveniently manage tags through a single interface

With Google Tag Manager, businesses can manage all of their marketing and analytics tags through a single interface rather than having to modify the code of their Shopify store.

Collaborate with team members

Google Tag Manager allows businesses to collaborate with team members by giving them access to the tag manager interface. This can be helpful for businesses that have multiple people working on their online marketing efforts.

Integrate with other tools and services

Google Tag Manager integrates with a wide range of tools and services, including Google Analytics, Google Ads, and third-party marketing and analytics tools. All of those services can be useful when running a Shopify store.

Too technical for you? We can help

Yes, using Google Tag Manager can seem challenging (we promise it gets easier once you get used to it). Fret not, though, as we can handle all the technical mumbo-jumbo for you. All you have to do is book a discovery call with us today!


Google Tag Manager Shopify Setup – FAQs

Share this:

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *