Table of Contents

    The Ultimate Ecommerce Guide For Google Tag Manager

    Google Tag Manager

    Tracking is pivotal for any business. With the help of Google Tag Manager’s ecommerce tracking, you can efficiently and effectively track all the major sales-influencing factors in your ecommerce business and, in turn, make the right choices to help your business perform better. This feature, along with Google Analytics, will completely change how you view the metrics involved with your business.

    What Is Google Tag Manager And Why Should You Use it?

    Google Tag Manager, or GTM, is Google’s tag management solution that is free of cost. This tool aids in deploying and overseeing different analytics and marketing tags connected to mobile apps and websites. The solution consists of multiple features that help add, enable, edit, disable, and remove tags from a site or an app. 

    Now, suppose you’re wondering what a ‘tag’ is. In that case, it’s nothing but a set of code written in Java that can help you gather pertinent information about your website or your app before transferring all the relevant information to Google Analytics. Moreover, the tool can save, process, and report data. This data can be queried via the API or the reporting interface and not through the tool itself.  

    Multiple reasons should compel you to start using this fantastic analytics platform including:

    • It allows for the fast deployment of tracking codes 
    • All tags can be controlled from one interface
    • Enjoy both built-in and third-party testing tools to make the add-on more effective 
    • The platform incorporates reusable container templates, simplifying your work
    • Event tracking is made very simple and accessible
    • The tool is completely free
    • Features numerous built-in tag templates to choose from
    • Custom templates can be applied
    • The process is version-controlled
    • Works perfectly for a variety of workspaces and environments
    • It’s very secure, and each tracking script is regularly scanned
    • Can be configured for custom user permissions and access

    Understanding Metrics Of An Optimized Ecommerce Campaign

    There are numerous success stories from ecommerce businesses that swear by the idea of swimming in data and obsessing over analytics. Some interpretation of data drives every marketing decision that you make. When these insights are used for optimization purposes, promotional and marketing activities will, in turn, become more relevant and practical. Without data and proper analysis, the chances of succeeding in competitive online markets are incredibly slim. 

    If you’re aiming to improve traffic to your online store and boost your revenues, you need to get your hands on the metrics that’ll form the cornerstone for any future strategy. Focus on several metrics, including segmented conversion rate, segmented revenue, funnel abandonment, returning customers, average order value, and more before putting all this data to good use by optimizing your ecommerce campaign according to the insights uncovered by studying these figures.

    What Is Enhanced Ecommerce Tracking In Google Tag Manager?

    Enhanced ecommerce tracking in Google Tag Manager involves tracking user interaction factors such as: 

    • Product clicks 
    • Product impressions
    • Adding product to the cart
    • Transactions
    • Initiating checkout 
    • View product details

    These enhanced events and user activities can be tracked by sending these event layers through dataLayer.push. The relevant codes can be triggered to follow when users land on specific pages. These codes will push the enhanced event to the data layer, and this particular data can be made available on the platform for further use. The modified data code is added after the body tag and executed. Accordingly, enhanced ecommerce GTM helps parse these specific events better while contributing to more informed decision-making.

    How To Set Up Ecommerce Tracking In Google Tag Manager

    Implementing ecommerce tracking in Google Tag Manager involves the following steps:

    • Integrate GTM With Your Cart

    The GTM container code must be after the body tag’s opening on all the pages of your website in case of a custom cart. For third-party shopping carts (like Shopify), you might need to connect with a third-party provider for more precise instructions. There are some third-party carts (like Magneto) that don’t require any GTM container code. You just have to provide your container ID to install the tag manager on your site automatically in these cases.

    • Deploy Universal Analytics Tracking

    You need to create a Universal Analytics tag on your site and then publish it. Following this, you can remove all the hard-coded Google Analytics tracking code from the website’s pages. If the tracking code isn’t removed, it’ll be triggered twice, resulting in an inflated data set.

    •  Ecommerce and Enhanced Ecommerce

    Google Analytics will only include ecommerce tracking data while reporting if it’s enabled in all views. To do so, you need to follow these steps:

    1. Go to the ‘Admin’ section of your Google Analytics account
    2. Select ‘Ecommerce Settings’ under ‘View’
    3. Use the toggles to ‘Enable Ecommerce’ and ‘Enable Enhanced Ecommerce Reporting’. Save the changes
    4. Enable your shopping cart with ecommerce tracking
    5. Include enhanced ecommerce events for a newly created data layer

    Case Study: How To Install Google Tag Manager In Shopify

    If you’re wondering how to install Google Tag Manager on a Shopify site, rest assured that the complete process of adding it to your store won’t take more than five minutes. However, you’ll have to pre-install Google Analytics on your website for the following methods to work successfully. The steps for handling the implementation with the popular ecommerce solution Shopify are as follows:

    Obtain Google Tag Manager Container Code

    • The first step is to find your container code. After setting up your Google Tag Manager account, you’ll see your code 
    • Proceed to login to your account, click on the "Admin" option over the top navigation, and then click on the "Install Google Tag Manager" option
    • You’ll receive two sets of codes; copy the code in between the "script" tags from the first code set. Then go on to reproduce the whole of the second set of code to save them for further steps 
    • Remember to issue your container by clicking on the "Submit" option and the "Publish" option if it’s your first experience with the platform

    Adding Google Tag Manager To the Shopify Store

    • Log in to your store and click on the "Preferences" option right under the "Online Store" 
    • Paste the first set of code you saved from the previous step on GTM
    • Select "Themes" right under the online store and search for "theme.liquid" before clicking on this option
    • Select the section of the first set of code that begins with "<body>" and paste the second set of code you saved from the tag manager right underneath 
    • The final step is to click on the "Save" option in the top right corner of the page so that the Shopify tag manager will be implemented

    Testing Installation

    • You’ll have to install the Tag Assistant extension in your browser to test the installation. Next, select the Tag Assistant icon and select the "enable" option
    • Now refresh the page before clicking on the extension once again. A green tag should be visible in Google Tag Manager to indicate a successful installation

    If you’ve carefully stuck to all the steps until this point, your tag manager installation on your Shopify site should be complete. Further confirmation is visible when the container is displayed on all your pages. 

    Tracking Performance In Google Tag Manager

    Enhanced ecommerce events enable GTM to track specific products listed within online stores. Some of the key events include:

    • Product impressions
    • Measuring product clicks
    • Calculating product detail views
    • Addition and removal from the shopping cart
    • Checkout steps

    Product Impressions

    When the user lands on the product category or the homepage of your website, the product impression event can then measure which items are shown to the user. 

    Measuring Product Clicks

    To track product clicks, ask your developer to activate and run a code set that measures user clicks on a specific product link.

    Calculating Product Detail Views

    In the next step, you’ll track how often users view the details of the product. This event is activated on the load page whenever the item’s product detail page is loaded with the other field objects.

    Addition And Removal From The Shopping Cart

    In a regular purchase funnel, the user can add and remove products from the cart. Therefore, it’s vital to measure these events. You can implement data layer push events for addition and removal actions as well.

    Checkout Steps

    Evaluate the journey after users click on the checkout button by implementing an event and pushing it into the data layer. This effort will cover all the user’s steps like inserting payment details, adding a shipping address, and applying coupon codes, if available. 

    As an ecommerce manager, you can also add multiple checkout events if your checkout procedure involves numerous steps like selecting the payment method, adding the shipping address and billing address, and other subsequent confirmations.

    Benefits Of Using GTM For Ecommerce

    One of the most significant advantages of GTM is the ability to adjust marketing campaigns as and when data is collected. The support and facilitation of all Google tags, along with a select few third-party tracking tags and marketing tags, make it incredibly user-friendly and intuitive to use. Data is accurate and dependable, ensuring actionable insights can be collected and implemented across campaigns. For any additional questions that arise, the platform also includes a tag management question and answer feature for free.

    Other significant benefits include:

    • Upon implementation of the system, ecommerce marketers can control the usage of site tags without the need for a developer
    • It provides an asynchronous tag loading, helping load pages faster 
    • The tag manager cleans up your code and allows you to manage all your tags from one single dashboard
    • Google Tag Manager empowers ecommerce managers to optimize and tweak their remarketing campaigns quickly 
    • The platform is incredibly intuitive and easy to use
    • Tag Manager is available completely free of charge

    Bottom Line

    Whether you’re new to ecommerce or have years of experience, it’s highly recommended to use Google Tag Manager to unlock the benefits of data collection and maximize conversion performance. Given the platform’s additional benefits and convenience, it’s only right that you, as an ecommerce manager, should take full advantage of this free tool to deliver ecommerce success. 


    1.   Can Google Analytics track sales?

    Yes, Google Analytics can track sales with the help of some additional configuration.

    2.   How does Google Analytics detect ecommerce tracking?

    While incorporating ecommerce tracking data into Google Analytics reports, you need to enable ecommerce for all data views. After that, Google Analytics can collect data from ecommerce tracking.

    3.   What is the difference between Google Analytics and GTM?

    GTM is an effective tag management tool that helps add, enable, edit, disable, and remove tags from a site or an app. The data collected using these tags is sent to Google Analytics to build more detailed data analysis reports.

     4.   Is Google Tag Manager a free tool?

    Yes, GTM is an entirely free online tool.

    5.   How do I know if Google Tag Manager is working?

    You can evaluate the tags attached to pages by debugging the console using GTM itself.

    6.   Will Google Tag Manager slow down my site?

    Yes, incorporating GTM may slow your site performance to an extent, but this can be reduced by employing various optimization techniques.