How to Setup Google Tag Manager on Shopify?

Shopify - Google Tag Manager Apps

Shopify DataLayer
for GTM

Google Tag Manager -Shopify Course

FAQ on GTM - Shopify Integration

 

Google Tag Manager (GTM) integration has never been easy for Shopify merchants as Shopify doesn’t offer a native integration.

However, now that you’ve arrived at this page, that will be all about a thing of the past for you. You are going to unearth everything you need from integration to Google Tag Manager data layers, setup options, FAQs, and many more to clear your mind off any sorts of questions.

In the world of e-commerce, every bit of information counts. Therefore you’d want to keep track of all possible actions such as add-to-cart, add-to-wishlist, view collection, view product, purchase, video actions, and so on – along with the data associated with them.

Not only would you want to track it, but you’d also want to share it with 3rd parties such as Facebook Pixel and Google Ads to improve your ad ROI.

GTM is your best friend for all of this, and you can connect Google Tag Manager with Shopify seamlessly even if you are a non-Shopify Plus customer.

As a globally trusted analytics partner to Shopify merchants, we have executed over 700 Google Tag Manager integrations within the last 10 months.

Now, we are ready to share everything we have learned along the way! The best part is that you don’t even need to be an Analyzify (or another Shopify app’s) client to be able to benefit from Google Tag Manager on Shopify. We have covered all the cases for you!

Effortlessly integrate Shopify & GTM, including advanced data layers.

Key Takeaways

Here are the key takeaways and best practices of Shopify – Google Tag Manager integration. Just take it as a summary as we are going to deep dive into each of them -and even further- in the next sections.

 

Our research has proved that all top Shopify stores use Google Tag Manager to get the best possible outcome.

Chapter 1

How to Setup Google Tag Manager on Shopify

 

We are more than happy to help you add the Google Tag Manager container to your Shopify store. As Shopify doesn’t support a native integration, there are two options for you to benefit here.

Let us give the answer before you ask: Yes, you can set up GTM on regular Shopify plans as well – it’s not only for Shopify Plus. You will find both our video and text tutorials on the following topics:

Method 1: Setup GTM on Shopify editing the code (without an app)


If you opt for this method, you’ll manually add the GTM container code to your theme.liquid file and the Additional Scripts section on your Checkout settings. We have prepared a step-by-step guide and a video series for this.

Our GTM Setup on Shopify tutorial covers:

  1. Creating a GTM account.
  2. Finding your Google Tag Manager container ID/code.
  3. Injecting GTM into your Shopify store (theme.liquid, checkout.liquid, additional scripts).
  4. Adding purchase data layers on your thank-you page.
  5. Adding product view data layers for single product pages.
  6. Create tags, triggers, variabes and settings up conversion tracking through GTM.


Method 2: Using an app to set up GTM on Shopify


You might find it technically hard to set up and make use of Google Tag Manager on Shopify – especially if you are looking for advanced integrations and reporting. Some Shopify apps help you set up GTM on your store with ease. They also provide you with advanced data layers and a GTM container so that you don’t have to deal with codes, hire a developer or data specialists.

If you plan to use GTM actively, we would recommend this method for you. Learn more about it and compare the apps by checking out the Shopify – Google Tag Manager apps section below.

Can non-Shopify Plus Shopify stores use Google Tag Manager?


Definitely, yes; but with some limitation. The only limitation is the lack of the checkout.liquid file. At the moment, only Shopify Plus stores have access to this file – and it allows to edit the checkout steps.

As regular Shopify stores don’t have the possibility to edit the checkout steps; the GTM won’t work there. However, 7 out of 8 e-commerce tracking events happen out of the checkout steps. So it is still so beneficial to use GTM for regular stores as well. You can learn more on this topic on our documentation: GTM for Regular Shopify vs. Shopify Plus 

That’s the reason Shopify says “Google Tag Manager is available only to stores on the Shopify Plus plan.” in the related documentation. 

Chapter 2

Shopify Google Tag Manager Apps


Google Tag Manager (GTM) is a fantastic tool that allows you to collect data and manage marketing/tracking tags all in one place.

If you want to have a solid, accurate, and in-depth reporting, measuring, and data-processing structure, Shopify Google Tag Manager apps are very important and useful for you.

Here are the top-ranked and loved apps:

Analyzify

We are not beating around the bush here: Analyzify is definitely the #1 choice on the Shopify app store for GTM integration. It is also ranked #1 in the “Google Tag Manager” search on the app store.

Here is why: It doesn’t only provide you with a stable connection between your store and GTM but also offers you a solid and accurate data analytics setup.

It is the most reviewed solution among the GTM apps with an overall score of 5.0 out of 190+ reviews.


Google Tag Manager App

Google Tag Manager app is ranked #2 in the same query. It has an overall score of 3.5 out of 20 reviews.

EasyTag

It’s another solution with totally positive reviews. EasyTag has a 5.0 score out of 33 reviews and it seems Shopify merchants are quite happy with this solution as well.

Chapter 3

Shopify dataLayer for GTM


dataLayer is one of the most important concepts of data tracking & analytics. Your GTM integration will be useless without proper data layers injected into your Shopify store.

We prepared and open-sourced Shopify data layers – special code blocks for you which will allow Google Tag Manager to read/process your purchase data. You will find the details and sources below.

Analyzify – Shopify Purchase Data Layer


Our purchase data layer is prepared to be triggered on the thank-you page and it covers the following data points:

  • Full Order Data (Order ID, Revenue, Currency, Tax, Shipping, Coupon Code)
  • Purchased Products including the product data (Product Name, ID, Category)

This data layer can be used in:

  • Google Ads & Facebook Pixel & Bing Ads Conversion Tracking
  • Google Analytics 4 & Universal Analytics Purchase event
  • All other tags that aim to reach your purchase data

On our data layer instructions page, you will find:

  1. Analyzify’s open-source and free data layer codes,
  2. How you can insert the related data layers into your Shopify store,
  3. How to customize the data layers according to your needs,
  4. Adding the related data layer variables into GTM,
  5. Using the data layer variables in the tags,
  6. Setting up Google Ads Conversion tracking using our tutorials.

Analyzify – Shopify Product View Data Layer


We have prepared our product view data layer to be triggered in your product pages. It transfers the product-level data to GTM including the product data such as Product ID, SKU, Price, Variant ID, Category.

You can use this data layer for:

  • Google Ads & Facebook Pixel remarketing events.
  • Google Analytics 4 E-commerce tracking Product reports.
Chapter 4

Google Tag Manager - Shopify Course


We love sharing & teaching! That’s why we have prepared this FREE Shopify – Google Tag Manager Course. We’d like to provide you with a complete solution – from intro to advanced – in using Google Tag Manager for your Shopify store by shedding light on how to get the best out of this fantastic tool.

The Shopify GTM course is straight to the point and actionable. Here is the lesson list:

  1. Intro to Google Tag Manager and Why Shopify Stores Need GTM [Lesson 1]
  2. Install Google Tag Manager on Shopify – Complete GTM Setup [Lesson 2]
  3. Install Google Analytics 4 on Shopify (with GTM) – GTM Essentials [Lesson 3]
  4. Set up Shopify dataLayer on Checkout – GTM Custom Events & Variables [Lesson 4]
  5. Shopify Google Ads Conversion Tracking – Complete Setup with GTM [Lesson 5]
  6. Shopify Facebook Pixel Complete Setup with GTM (Conversion + Events)- [Lesson 6]
  7. Set up Google Analytics 4 E-commerce Tracking on Shopify with GTM [Lesson 7]
Chapter 5

FAQ on GTM - Shopify Integration

Shopify Conversion Tracking Chapter FAQ

Yes! GTM has the Google Ads conversion tracking tags, and you just need to add the data layers on your “thank you” page, and then use GTM’s Google Ads conversion tag to pass the relevant data.

We also have a video tutorial series on Youtube for this specific topic, so be sure to check it out.

You can view your store’s source and search for a line starting with “GTM-“. The container’s code snippet should be visible if you have GTM already installed in your store.

If you do have it installed, just mark the related section during your onboarding, and Analyzify will take care of the rest.

If you don’t have it installed, worry not, as Analyzify will do it for you.

GTM has countless benefits, but its main purpose is to help you manage your marketing / tracking pixels from one place without needing a developer.

By using the same data sets, you can set up Google Analytics 4, Google Ads conversion tracking, Bing pixels, and many others. Check out our related post to learn even more benefits.

Just like the regular version of Analyzify, our server-side tagging setup will be served under your properties. We will not collect or pass any data to our properties. All the data will flow into your own Google Analytics, Google Cloud and GTM accounts. Our team will be responsible for the setup and validation.

Technically no, but practically, yes. You can use GTM without using data layers, but if you do that, you won’t be able to pass specific data (e.g. product ID, name, order total revenue, etc.).

You can only use the general tags like Google Analytics 4 – which works on all pages. However, you can’t use Google Ads Conversion Tracking properly, because you again need some information like the order ID, revenue, currency, and a few others.

Analyzify provides open-source data layers for Shopify merchants.

You can set up GTM on Shopify’s checkout pages using the “checkout.liquid” file. However, this is only possible and available for Shopify Plus merchants at the moment.

The good news is, Shopify announced that this will soon be available for all plans!

There are some work arounds – but we DO NOT recommend them. They don’t work properly, and they can even break your existing tracking in the process.

Firstly, Enhanced E-commerce (EE) is a Universal Analytics feature, and you do not need to use Google Tag Manager to set up Enhanced E-commerce on Shopify.

You can follow our Universal Analytics Complete Setup guide to achieve a full Enhanced E-commerce tracking.

Because of the “checkout.liquid” file limitations, setting EE through GTM is only possible for Shopify Plus clients. If you are one and still wish to set it up, you can use Analyzify to achieve this.

Definitely yes. GTM is useable for non-Shopify Plus stores as well. You can add the GTM container to theme.liquid file and order processing additional scripts.

The only limitation that regular Shopify stores have is NOT being allowed to edit the checkout process due to checkout.liquid file limitations.

Purchase tracking and other user behavior metrics/reports are so crucial and you will still have a majority of the events/reports.

Google Tag Manager and all other tracking codes will still WORK on every page + order processed (thank you page) but the checkout steps won’t be included.