As a Shopify Partner, our agency team has prepared solutions to help Shopify stores to quickly and easily install, transfer, and further track all the data necessary for business – a set of ready-made tags and variables ready to import your Google Tag Manager and further configuration.
There will be a separate article to learn more about these solutions. In this article, we would like to describe how to install Google Tag Manager for Shopify correctly.
Before installing GTM in Shopify, you need three basic things:
The rest of the process adding Google Tag Manager to your Shopify site should take no longer than 5 minutes.
GTM snippet consists of two pieces of code.
From the <head> part, copy everything between the “script” tags (excluding the actual tags). You will need it in the next step.
Then, copy the <body> second part and save it for the next step.
If you are using a new GTM account, don’t forget to publish the container.
Log in to your store and click on “Preferences” under “Online Store”.
Enter your GA id if you didn’t do this earlier and click on ‘Add custom JavaScript’.
Paste the <head> piece of code you got from Google Tag Manager on the previous step, and click “Save”.
Next, click on “Themes” under “Online Store”, then click “Actions” and then “Edit Code”.
Click on ‘theme.liquid’ and paste the <body> part of GTM code right after the open <body> tag
Finally, click “Save” in the top right corner.
To test if everything is working well, you need to install the Google Tag Assistant Extension for Google Chrome.
Once you’ve done that, open your website and click on the Google Tag Assistant icon, then click “Enable”.
Refresh your page and again click on Tag Assistant icon and you will see that GTM code is active.
PS:
#1. Don’t use GTM to deploy Google Analytics tag – connect GA id directly in Shopify. Otherwise, you might have some trouble with cross-domain tracking.
#2. Don’t use GTM to deploy enhanced eCommerce as it’s a built-in function in Shopify.
#3. Use GTM to track events, button clicks, installing such pixels as Facebook, Hotjar, Twitter, Google conversion linker, etc. To do it easily and fast just read the next part of the article.
What is this? – A set (archive) of ready-to-use tags, triggers and variables, which are provided for free only to our readers. By clicking on the link, you can download this archive and right away import it into your Google Tag Manager account.
We analyzed other solutions and made our own assembly that is full of useful functionality. At the moment, this is one of the most complete assemblies that we know about. Our experts using this kit to work with eCommerce or projects in an early stage. The data that you will receive helps to understand user behavior on the site, their preferences in the purchase, business metrics, time spent on the site, etc. Also, provided features help to work with data correlation, like, which user actions on the site lead to conversion.
Shopify eCommerce tags+triggers+variables:
Pixels and listeners:
Other:
JS variables:
If you still have any questions about how to make Google Tag Manager working on Shopify or you need any help in digital marketing or conversion rate optimization, just send us a message or schedule a free 30-minute call with us. We really want to help you.