How to Install Google Tag Manager in Shopify

February 12, 2024
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.

Before installing GTM in Shopify, you need three basic things:

  1. Google Analytics account, connected to Shopify. Make sure that enhanced eCommerce tracking is enabled in Google Analytics and Shopify.
  2. 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.
  3. Shopify store.

The rest of the process adding Google Tag Manager to your Shopify site should take no longer than 5 minutes.

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”.

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.

You can double your sales
without increasing the budget on ads

Send Request

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.

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.

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
Easy Google Tag Manager Plugin integration
Start working with data to increase conversion
Track purchase, revenue, etc

Click Here to Download Google Tag Manager FREE KIT right now!

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.

__wf_зарезервований_спадкування
Дякую! Ваша заявка отримана!
На жаль! Щось пішло не так під час подання форми.
__wf_зарезервований_спадкування