Matt Pattoli

Founder at Cometly

June 28, 2023

8 minute read

Ecommerce

Guide: Setting Up Google Tag Manager for WooCommerce

Google Tag Manager (GTM) has emerged as a crucial tool for digital marketers, providing a dynamic and user-friendly way to manage and deploy marketing tags on your website without having to modify the code. It's an efficient solution that not only simplifies the process but also makes the tracking more accurate. For WooCommerce users, incorporating GTM can offer tremendous value, enabling powerful tracking to understand user behavior and measure performance. This guide will outline the step-by-step process of setting up Google Tag Manager for WooCommerce.

What is Google Tag Manager?

Before diving into the setup process, it's important to understand what GTM is. Simply put, Google Tag Manager is a tag management system that allows you to quickly and easily update tags and code snippets on your website or mobile app, such as those intended for traffic analysis and marketing optimization. It facilitates the deployment of tags without needing to manually add the code to your website, thereby minimizing errors and maximizing efficiency.

Step 1: Setting up a Google Tag Manager Account

The first step in the process is to set up a Google Tag Manager account. Here's how to do that:

  1. Go to the Google Tag Manager homepage.
  2. Click on the 'Start for free' button.
  3. Sign in to your Google Account. If you don't have a Google account, you'll need to create one.
  4. Once you're signed in, you'll be prompted to set up a new Tag Manager account. Enter your Account Name (usually your business name) and choose your country.
  5. The next step is to set up a container. This should be the URL of your WooCommerce store. Also, select where you want to use the container (Web).
  6. Accept the GTM Terms of Service Agreement, and your account will be ready.

Step 2: Installing Google Tag Manager on Your WooCommerce Store

Once your GTM account is set up, the next step is installing GTM on your WooCommerce store. There are various ways to do this, but one of the simplest methods is to use a WordPress plugin, such as "DuracellTomi's Google Tag Manager for WordPress". This plugin allows you to quickly integrate GTM with your WooCommerce store.

  1. Log into your WordPress Dashboard.
  2. Go to Plugins > Add New.
  3. Search for "DuracellTomi's Google Tag Manager for WordPress".
  4. Install and activate the plugin.
  5. Navigate to Settings > Google Tag Manager.
  6. Insert your GTM ID (found in your GTM dashboard as "GTM-XXXX") into the 'Container ID' field.
  7. Save the changes.

Step 3: Configuring WooCommerce with GTM

With the plugin installed, you need to configure it properly to integrate GTM with your WooCommerce store. The plugin provides an 'Integration' tab that provides options for integration with various tools, including WooCommerce.

  1. In your WordPress Dashboard, navigate to Settings > Google Tag Manager > Integration.
  2. Check the box next to WooCommerce.
  3. Save the changes.

Once this is done, GTM will automatically start tracking basic eCommerce data from your WooCommerce store.

Step 4: Setting Up Google Analytics and Enhanced eCommerce Tracking

While GTM is now set up, the real power comes from the ability to track specific actions on your site. This is where Google Analytics and Enhanced eCommerce tracking come into play.

  1. In your GTM dashboard, create a new tag by clicking 'New Tag'.
  2. Name the tag (for instance, 'GA – Pageview') and click on 'Tag Configuration'.
  3. Choose 'Google Analytics: Universal Analytics' as the tag type.
  4. Configure the tag by setting the Track Type to 'Page View', and set up a new variable for your Google Analytics tracking ID.
  5. Next, navigate to the 'Triggering' section and set the trigger to 'All Pages'. This means the tag will be activated on every page of your website.

Setting up Enhanced eCommerce is a bit more detailed, and it's recommended to follow Google's official guide on this. Once set up, you'll be able to track detailed eCommerce data such as product impressions, product clicks, adding products to shopping carts, transactions, and more.

Step 5: Testing and Publishing Your Setup

Before making your GTM setup live, it's crucial to test everything. GTM provides a 'Preview' mode that allows you to test your tags and triggers to ensure they're working as expected.

  1. In your GTM dashboard, click on 'Preview'.
  2. Navigate to your WooCommerce store and you'll see a GTM debugging console at the bottom of your screen.
  3. Use this console to verify if your tags are firing correctly.

If everything is working as expected, you can publish your changes in GTM by clicking on 'Submit', providing a version name and description, and then clicking on 'Publish'.

Conclusion

Setting up Google Tag Manager for your WooCommerce store might seem complex at first, but it's a straightforward process when broken down into steps. By implementing GTM, you'll gain more insight into your store's performance and user behavior, enabling you to make data-driven decisions for your business. As you become more comfortable with GTM, you can start to create more complex tags and triggers to suit your specific tracking needs. Remember, the key to successful data analysis is not just collecting the data, but also interpreting it to understand your customers better and enhance your eCommerce strategies.