How to Install Google Tag Manager in Shopify

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.
- Google Analytics account, connected to Shopify. Make sure that enhanced eCommerce tracking is enabled in Google Analytics and Shopify.
- Google Tag Manager account. It allows you to easily deploy code and tracking pixels to your site without the need to edit the code of asking your developer to do it.
- Shopify store.
Step #1. Google Tag Manager account setup
- If you don’t have an account yet, sign up for Google Tag Manager and set up your account. You’ll get your code right away.
- If you already have a Google Tag Manager account for this website, log into your account, click “Admin” on the top navigation, and then click “Install Google Tag Manager”.


You can double your sales
without increasing the budget on ads
Step #2. Shopify setup
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.
Step #3. Debugging
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.
Google Tag Manager Basic Kit for Shopify
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.
How Google Tag Manager Basic Kit will help you
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.
What's included in Google Tag Manager Tag Kit
Shopify eCommerce tags+triggers+variables:
- Add to cart
- Remove from Cart
- Product Impressions
- Product details
- Purchase
- Ajax events listener
Pixels and listeners:
- Facebook pixel
- Klaviyo – form listener
- Adroll pixel
- Twitter pixel
- Hotjar pixel
- Pinterest pixel
- K50 pixel
Other:
- Page load speed tracking. Adds a Google Analytics event to track when a page has finished loading
- Scroll events
JS variables:
- JS – Checkout Email
- JS – Checkout Step
- JS – Currency Code
- JS – Customer ID
- JS – Discount Amount
- JS – Discount Code
- JS – Estimated Price
- JS – Is Purchase
- JS – Line Items
- JS – Total Revenue
- JS – Order ID
- JS – Product IDs
- JS – eCommerce Touchpoint Name
- JS – Product SKU List
- JS – Purchase Shipping Amount
- JS – Purchase Tax Amount
- JS – Total Product Value



Want to consult about something?
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.