Wiki Guide

How to Set Up Ecommerce Tracking with Google Tag Manager: Full Guide

Written ByLokendra

Hey there! If you’re running an online store, you’ve probably wondered how to get a clearer picture of what your customers are up to. That’s where Set up ecommerce tracking with Google Tag Manager comes in. It’s like putting a magnifying glass over your sales data—suddenly, you can see what’s selling, what’s not, and where your customers are dropping off.

In today’s market, understanding your shoppers isn’t just nice to have; it’s a must. Whether you’re new to Google Tag Manager (GTM) or looking to fine-tune your setup, this guide is here to walk you through it all. Ready to dive in? Let’s get started!


Why Ecommerce Tracking Matters for Your Online Store

Let’s be real—running an online store can feel like a guessing game sometimes. Are people loving that new product? Are they abandoning their carts? Without data, you’re flying blind. That’s why Google Tag Manager ecommerce setup is a game-changer. It lets you track everything from product views to purchases, giving you the insights you need to grow your business.

  • See what’s hot: Track which products are getting the most clicks.
  • Spot trouble zones: Find out where customers leave your site.
  • Measure your success: Know exactly how much revenue your campaigns are bringing in.

I’ve helped a few small business owners set this up, and the difference it makes is night and day. One friend of mine discovered her best-selling item wasn’t even on her homepage—imagine the sales she’d been missing out on! With GTM ecommerce tracking, you’re not just collecting numbers; you’re unlocking stories about your customers.


Step-by-Step Guide to Set Up Ecommerce Tracking in Google Tag Manager

Alright, let’s roll up our sleeves and get to the good stuff: how to set up ecommerce tracking in Google Tag Manager for beginners (and pros too!). Don’t worry—I’ll break it down into bite-sized steps so it’s easy to follow. Before we start, make sure you’ve got a Google Tag Manager account and Google Analytics linked to your site.

1. Enable Ecommerce in Google Analytics

First things first, head over to your Google Analytics account:

  1. Go to Admin > Ecommerce Settings (under the View column).
  2. Toggle Enable Ecommerce to ON. If you want richer data (like product performance), turn on Enhanced Ecommerce too.
  3. Hit Save.

This tells Google Analytics to expect ecommerce data from GTM. Think of it as flipping the “on” switch.

2. Set Up Your Data Layer

The data layer is like the secret sauce of GTM ecommerce tracking. It’s a snippet of code that passes info—like product names or prices—from your website to GTM. If you’re on a platform like Shopify or WooCommerce, this might already be built in.

dataLayer.push({
  'event': 'purchase',
  'ecommerce': {
    'purchase': {
      'actionField': {
        'id': 'T12345',
        'revenue': '35.00'
      },
      'products': [{
        'name': 'Cool T-Shirt',
        'price': '15.00',
        'quantity': 2
      }]
    }
  }
});
      

3. Create Tags in Google Tag Manager

Now, let’s tell GTM what to do with that data:

  1. In GTM, click Tags > New.
  2. Choose Google Analytics: Universal Analytics as the tag type.
  3. Set the Track Type to Event.
  4. Under Google Analytics Settings, select your GA variable.
  5. Save it with a clear name like “Ecommerce Purchase Tag.”

4. Add Triggers

Triggers tell GTM when to fire your tag. For a purchase:

  1. Go to Triggers > New > Custom Event.
  2. Name it (e.g., “Purchase Trigger”).
  3. Set the Event Name to match your data layer (e.g., “purchase”).
  4. Save it and link it to your tag.

5. Test Your Setup

Before you celebrate, test it! Use GTM’s Preview mode to simulate a purchase on your site. Check the Real-Time reports in Google Analytics—do you see the data flowing in? If not, double-check your data layer and triggers. It’s like proofreading an email before hitting send.


Common Challenges and How to Fix Them

  • Data not showing up: Double-check your data layer. If it’s missing or broken, GTM won’t know what to send. Use your browser's console to confirm it's firing.
  • Duplicate transactions: This can happen if your trigger fires twice. Test with a unique transaction ID to spot the issue.
  • Confusing reports: If your numbers look off, make sure Enhanced Ecommerce is enabled—it gives you more detail than basic tracking.

Conclusion

And there you have it—a full guide to set up ecommerce tracking with Google Tag Manager! From spotting hot products to fixing cart drop-offs, this setup gives you the tools to grow your store with confidence. It might take a bit of tinkering to get right, but trust me, the payoff is worth it. Ready to scale your sales? AdyCircle is here to help.

FAQ

Everything You Need to Know

Get In Touch

Ready to Scale Your D2C Brand or Ecommerce Store ? Let's Talk.

Book a free 30-minute session to audit your marketing and identify scale opportunities. We'll show you how to grow your brand with zero obligation and zero sales pressure.

Office location icon

Location: Ahmedabad, Gujarat, India

Serving regions icon

Serving: India · USA · UK · Australia · UAE

Phone
Select Industry
Select Budget
Select Source
30 minutesSenior strategistNo obligation