Nothing beats Google Tag Manager when it comes to eCommerce tracking (GTM). It’s a robust tool that lets you add and update tracking tags without having to change the code of your website.

GTM helps you understand the elements that drive sales and the sources that attract the most visitors by tracking significant interactions on your eCommerce site.

With Google Tag Manager (GTM), you can create new tags with just a few clicks. Google Tag Manager, the world’s most popular enterprise-grade tag management tool, works with both Google and third-party tags.

Google Tag Manager allows you to see into your customers’ lives. You can increase conversion and revenue for your business by utilizing Tag Manager to publish and manage tags for your eCommerce store.

We’ve written several articles about the benefits of Google Tag Manager and how to use it, but we haven’t gone into detail about why you should use it for eCommerce. This article explains that. We will highlight the steps to use Google Tag Manager for eCommerce tracking.

 

What is Google Tag Manager, and how does it work?

Google Tag Manager (GTM) is a free product that caters to the analytics needs of digital marketers. It allows you to handle tags (often JavaScript tracking snippets) from a single interface. GTM, of course, works nicely with other Google products, like Google Analytics Enhanced Ecommerce, which we’ll talk about later in this piece. It also accepts custom tags and tags from third-party vendors.

 

The Advantages of Using Google Tag Manager for Ecommerce Tracking

1. Get more PPC data

The more data you have as a pay-per-click (PPC) marketer, the better you can optimize your marketing efforts. You won’t be able to determine the core reason for cart abandonment or where people exit your sales funnel if you solely utilize basic tracking configurations.

For example, if you notice that more than half of your prospects are quitting your funnel simultaneously, you may look into that phase and figure out what’s causing the issue.

Perhaps your checkout procedure has too many steps for the customer to complete, or your site navigation is too convoluted and not user-friendly.

If you don’t have information on your sales funnel, you can’t track the customer journey and discover obstacles that keep them from purchasing.

When you use Google Tag Manager to start eCommerce tracking, it gives you all the information you need to figure out which products are performing better than others. This information can be used to evaluate everything from the pricing to the product description to the checkout procedure.

 

2. Enable Enhanced Ecommerce

Google Tag Manager allows you more control over Google Analytics and other marketing platforms such as Google Ads and Facebook. With the help of GTM, you can construct Google Analytics Enhanced eCommerce events that can help you track the user journey on your website.

You can track various events, including impressions, product views, add or remove from cart, checkout steps, purchase, form submission, error message tracking, etc.

GTM also makes it easier to turn on the Enhanced Conversion option in Google Ads, and it has a lot of features that you’ll discover after you start using it.

 

3. Track all your tags in one place

Google Tag Manager brings all of your tracking tags together. Your retargeting initiatives, on-site behavior & events, and PPC/display/social marketing are all grouped together in a Google Tag Manager container. GTM also allows you to create selective triggers and add speed optimization steps that ensure triggering all of these tags does not disrupt the user experience on your site.

It also provides an easy-to-use interface for non-technical, marketing-oriented people to add, remove, and edit tracking tags. It separates tracking metrics from the website’s code, allowing marketers to focus on their work without dealing with developers.

 

4. Reliable eCommerce data

GTM also makes your eCommerce data that is both reliable and accurate. When your tags aren’t operating correctly, they can slow down your site’s load time, cause it to go down, or cause it to lose functionality.

That’s why having a tag management solution in place that lets you immediately check the status of your tags is vital.

With Google Tag Manager’s simple error checking and fast tag loading, you can ensure that every tag is working. You can relax knowing that your mission-critical data is being captured accurately and dependably!

Even during busy holidays or the launch of a new campaign, your IT team will be confident that the site is functioning smoothly, ensuring that everyone is delighted.

Large brands like PizzaHut, Made.com, AgeUK, and others have integrated GTM to debut their tags: dependable and accurate eCommerce data.

 

5. Use Google and third-party tags quickly.

Google Tag Manager works with all tags and includes templates for various Google and third-party tags for web and mobile apps.

Don’t see a tag you’re looking for? You can include it as a custom tag right now. With so much versatility, you can get started on your campaign with only a few clicks.

You can use Google Tag Manager to utilize Google Ads (Adwords), Adroll, Facebook, Hotjar, Criteo, or your own script.

 

6. Collaborate throughout the organization and update tags quickly.

Within Google Tag Manager, workspaces and flexible access controls enable your team to collaborate effectively. Multiple users can modify tags simultaneously and publish changes as soon as they’re ready. Multi-environment testing allows you to publish to multiple environments to check everything is operating correctly.

 

How To Setup Google Tag Manager for E-Commerce Tracking

It’s critical to track conversions from your website’s store or payment gateway to keep track of sales and figure out where they’re coming from. E-commerce tracking must be enabled and configured in Google Analytics for you to be able to import this data.

There are a few stages to implementing E-commerce tracking with Google Tag Manager:

1. Activate Google Analytics

  • Navigate to the Admin area of Google Analytics.
  • Go to the View Section.
  • Click E-commerce Settings.
  • Change the setting for Enable E-commerce to ON.

Ecommerce tracking can be enabled by using the Admin section in Google Analytics

2. Implement E-commerce Data Layer.

Your website and payment store structure will significantly impact how you implement the e-commerce data layer. Depending on whether you’re using Magneto and Spotify, you’ll have to pay for a plug-in that embeds the data layer in the code. The code may need to be tweaked depending on the variables you wish to include in Google Analytics. It’s usually advisable to have a developer set this up for you if you’re not comfortable with Javascript or setting up a data layer. An example of an e-commerce data layer is shown below.



<script>

window.dataLayer = window.dataLayer || []

dataLayer.push({

'transactionId': '1234',

'transactionAffiliation': 'Acme Clothing',

'transactionTotal': 38.26,

'transactionTax': 1.29,

'transactionShipping': 5,

'transactionProducts': [{

'sku': 'DD44',

'name': 'T-Shirt',

'category': 'Apparel',

'price': 11.99,

'quantity': 1

},{

'sku': 'AA1243544',

'name': 'Socks',

'category': 'Apparel',

'price': 9.99,

'quantity': 2

}]

});

</script>

3. Set the E-commerce Tag in GTM

1. Open Google Tag Manager

2. Click “Trigger”

3. Then create a new Trigger

4. Click Page URL equals to /thank you.

5. Choose a page URL that begins with / thankyou (then enter the precise URL for the thank you page).

6. Name the trigger.

7. Click on a Tag and then New.

8. Select Google Analytics Tag in the Tag Configuration Window.

9. Add your Google Analytics ID to the Tag and select Transaction as the Track Type.

10. Finally, choose a new trigger.

The Trigger Configuration should look like this.

The trigger should be set for just the thankyou page for ecommerce

 

How to Add Triggers to View Details, Checkout, and Purchase

A trigger in Google Tag Manager listens to your web page or mobile app for specific types of events, such as form submissions, button clicks, or page views, and notifies the tag to fire once the event you specified is detected. All tag must have at least one trigger to be activated.

You need to build three distinct triggers in the Triggers section for the various custom events for eCommerce, including the detail, checkout, and purchase events, which are used to fire the tag to the dataLayer.

To build the rest of the triggers, simply change the term “detail” with “checkout” or “buy,” depending on the trigger you’re working on at the time.

 

1. Go to Google Tag Manager and either select an existing account or create a new one.

2. If you choose to create a new account, fill in all of the essential information and choose Web as your platform.

3. Select the Triggers tab.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615d94692b380503dfdf7ddb/file-3uUhBEFHQ4.png

4. To create a new trigger, click the New button in the upper right corner.

5. Select Untitled Trigger and type “detail” in the box.

6. Select Custom Event as the trigger type.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f83ebe5648623c88e2a85/file-gBMhaN5O7X.png

7. The event name must be the same as the trigger name, in this example, “detail.”

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f83ebe5648623c88e2a85/file-gBMhaN5O7X.png

8. Untick the Use regex matching box, and the trigger should fire on All Custom Events.

9. Follow the same steps for checkout and purchase trigger.

10. The triggers tab should look like this when you’ve created all three triggers:

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f86a20332cb5b9e9b1dd7/file-RfSAyrZK7r.png

 

  • Adding the Variables

GTM Variables are named placeholders for data that are populated anytime a code is run on a site or mobile app, such as Page URL, which yields the current web page URL.

Follow the steps below to create a variable:

1. Select the Variables tab.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8a8112c07c18afddb7a3/file-cHqfDzrT3g.jpg

2. Then, in the User-Defined Variables section, click the New button to create a new variable.

3. The Universal Analytics ID is the first variable, which will be added every time we need to write the UA-ID. The variable should be named “Universal Analytic.” Click on the Untitled Variable button to do this

4. Then click on variable Configuration and click the Constant option in the utilities section.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8ccc0332cb5b9e9b1ded/file-Rb6Kg6tofT.png

5. Enter the UA-ID from the Google Analytics account in the Value field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8cee12c07c18afddb7b3/file-V0zhpcNFyS.png

6. Click the Save button.

7. Create a variable with the name “Google Analytics Settings” that will hold the tag settings for each tag. Under the Utilities section, pick Google Analytics Settings as the Variable Type.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8d3b12c07c18afddb7b5/file-kHmTXx6vk0.png

8. Add Universal Analytics to the Tracking ID field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8d91e5648623c88e2ab5/file-3xSFZwLRIz.jpg

9. Make sure the cookie domain is set to auto.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8e88e5648623c88e2ab8/file-dCXqGTI6xn.jpg

10. Open the Ecommerce option in More Settings and enable the Enhanced Ecommerce Features and the data layer.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8e9f2b380503dfdf89ad/file-rUdmhPQ18U.png

11. In the Page Variables section, create a variable called “GA – e-commerce” and set it up as a Data Layer Variable. This allows you to create a variable in the data layer which will get the e-commerce revenue value.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8e9f2b380503dfdf89ad/file-rUdmhPQ18U.png

12. The name of the Data Layer Variable should be eCommerce.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8ed2e5648623c88e2abc/file-6sdCmz6UQA.jpg

13. The Data Layer Version should be Version 2.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f8ef9e5648623c88e2abe/file-vLXzOV563R.png

14. Select Save.

15. In the Page Variables section, create a variable with the name “DLV – eCommerce – revenue.” Then set it up as a Data Layer Variable. This adds the revenue variable to the data layer.

16. The Data Layer Variable Name should be eCommerce.purchase.actionField.revenue

17. The Data Layer Version should be Version 2.

18. Remember to save the variable.

19. The variables should resemble the screenshot below.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615f92c60332cb5b9e9b1df8/file-TmvDvC4qSc.png

 

  • Creating Tags and linking them with Triggers

We’ll need four tags: three for various custom events (detail, checkout, and purchase) and one for page views.

• When users view the live page of an experience, the detail tag will be triggered.

• When users arrive at the checkout page, the checkout tag will activate.

• After finishing the checkout process and before viewing the booking confirmation screen, the purchase tag fires.

Here’s how to create a new tag:

1. Go to the Tags tab of the menu bar.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa34b0332cb5b9e9b1e1c/file-NILf1hp1tq.png

2. Select New.

3. Click Untitled tag and Type “detail tag.”

4. Click on Tag Configuration.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa39ee5648623c88e2aed/file-Fj0IQIzUoV.png

5. Select Google Analytics: Universal Analytics from the Tag type menu.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa3c39ccf62287e5ea0af/file-tJYMHJVXRk.png

6. Select Event from the Track Type

7. Type “e-commerce” in the Category field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa52e0332cb5b9e9b1e25/file-FvIbe0qFuc.png

8. Type “detail” in the Action field.

9. The Label field’s recommended setting is {{Page URL}}” which you may type or pick using the Variables button to the right of the field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa56612c07c18afddb7e5/file-apTtZNnFuq.png

10. Set the Non-Interaction Hit to be True.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa590e5648623c88e2af4/file-YViLr5W0iG.png

11. Select the {{Google Analytics}} variable in the Google Analytics Settings.

12. Click the Triggering box down below.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa5c212c07c18afddb7e8/file-tjboRAb1GH.png

13. Select the detail trigger from the trigger menu.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa5d7e5648623c88e2af6/file-wvvMQVMzsg.png

14. In the upper right corner, click Save.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa5fde5648623c88e2af8/file-tiIlz0iALm.png

15. To make the checkout tag, follow the same procedures as before, except:

a. “Checkout tag” should be the name in step 3.

b. “Checkout” should be the Action in step 8, and

c. The checkout trigger must be selected in step 13 of the process.

16. Follow all of the above procedures to make the purchase tag and:

a. Type “DLV – e-commerce -revenue” or select it from the variables list in the Value field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa66b2b380503dfdf89d7/file-eC5rArtyZ3.png

b. Enable overriding settings in the tag by checking the box.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fa68d0332cb5b9e9b1e2a/file-U4DJzfu3VI.png

c. Expand the More Settings menu.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fab8812c07c18afddb7f6/file-nSAsSri0dM.png

d. Expand the Fields to Set menu.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615faba512c07c18afddb7f7/file-LlyCLGEjMk.png

e. Click the + Add Field button.

f. Type “transport” in the Field Name field and “beacon” in the Value field.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fabe512c07c18afddb7f8/file-Qo6iFmqOp4.png

g. Select the purchase trigger in step 13

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615fac1412c07c18afddb7f9/file-vFoS7iU2tk.png

17. For the all pages tag, use:

a. In step 3, the tag’s name should be “all pages tag.”

b. Page View should be the track type in step 6.

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615faf6c2b380503dfdf89e7/file-l9Gic4F9BA.png

c. the trigger in step should be All pages

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615faf7e0332cb5b9e9b1e39/file-NkW2OdpuK0.png

18. Finally, the tag tab should resemble this:

https://d33v4339jhl8k0.cloudfront.net/docs/assets/55882b8ee4b027e1978e9b80/images/615faf929ccf62287e5ea0c2/file-LEkPjkb32z.png