How to add google tag manager to shopify easily

How to add google tag manager to shopify easily

Rate this article

Share this article

In today’s digital landscape, optimizing your Shopify store’s performance and gaining valuable insights into user behaviour are crucial for success. One powerful tool that can assist in achieving this is Google Tag Manager (GTM). In our previous post, we introduced the basic steps to add GTM to Shopify. Now, let’s delve deeper into the benefits and advanced features that GTM offers to supercharge your e-commerce analytics.

Streamlining E-commerce Tracking:

GTM enables seamless integration of e-commerce tracking tags without the need for manual coding. By implementing enhanced e-commerce tracking, you can gain valuable insights into customer behaviour, such as product views, clicks, and purchases. This information is instrumental in refining your marketing strategies and improving the overall user experience on your Shopify store.

Implementing Custom Events:

Take your analytics to the next level by implementing custom events through GTM. Whether it’s tracking specific button clicks, form submissions, or other user interactions, GTM allows you to set up custom triggers and tags effortlessly. This granular level of tracking provides a more comprehensive understanding of how visitors engage with your site, allowing you to make data-driven decisions for optimization.

Dynamic Remarketing:

Harness the power of GTM to implement dynamic remarketing tags on your Shopify store. Dynamic remarketing allows you to show personalized ads to users who have previously visited your site, showcasing products they viewed. This targeted approach enhances the chances of converting potential customers into actual buyers, boosting your e-commerce revenue.

Cross-Domain Tracking:

If your Shopify store spans multiple domains, implementing cross-domain tracking through GTM is essential. This ensures that user sessions are tracked seamlessly across different domains, providing a unified view of customer journeys. With accurate cross-domain tracking, you can better understand the effectiveness of your marketing efforts and optimize the user experience throughout the entire customer journey.

A/B Testing with GTM:

Experimentation is key to refining your online presence. GTM facilitates A/B testing by allowing you to easily deploy and manage variations of tags, triggers, and other elements on your Shopify site. Test different layouts, CTAs, or promotional banners to identify what resonates best with your audience, ultimately improving your conversion rates

Here are simple steps to add google tag manage to Shopify

Add google tag manager to shopify easily

add google tag manager to shopify

  1. Create a google tag manager account
  2. If you already have a google tag manager account, go to Admin-> Install Google tag manageradd google tag manager to shopify
  3. Copy this code.
  4. Log in to your Shopify admin panel.
  5. Go to online store-> themes-> Actions->click on “edit code”.
  6. Open the theme.liquid file and add the google tag manager code to the head section of this file. (between <head></head>)add google tag manager to shopify
  7. If you are a Shopify Plus user, add the google tag manager code to your checkout.liquid file in the <head> section as well.
  8. There is a second portion to your google tag manager, this has to be added to the theme.liquid and checkout.liquid files in the <body> section.add google tag manager to shopify


In conclusion, integrating Google Tag Manager with your Shopify store goes beyond the basic setup. Leveraging advanced features like enhanced e-commerce tracking, custom events, dynamic remarketing, cross-domain tracking, and A/B testing empowers you to make data-driven decisions that can significantly impact your e-commerce success.

By expanding your understanding of Google Tag Manager and its capabilities, you unlock the potential to optimize your Shopify store for higher performance, increased conversions, and an enhanced user experience. Stay ahead of the competition by harnessing the full power of GTM and taking your e-commerce analytics to new heights.

Add great search to your Shopify store

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like