How to Set Up Google Tag Manager and Track View Item Conversion Actions on Your WooCommerce Store

by ShahzadaAliHassan - 24th July 2024

Introduction

By the end of this guide, you'll learn how to:

  1. Configure Google Tag Manager (GTM) on your website.
  2. Create conversion actions and labels in Google Ads.
  3. Set up a data layer for tracking view item events.
  4. Test to ensure everything works correctly.

Checking Access Permissions

Step 1: Verify Access to WordPress, Google Tag Manager, and Google Analytics

  1. Google Ads Access:

    • Go to ads.google.com and select your account.
    • Navigate to Admin > User Access.
    • Ensure you have admin or standard access.
  2. Google Tag Manager Access:

    • Go to the Admin section in GTM.
    • Click on User Management under your account.
    • Ensure you have publish access to the container.
  3. WordPress Access:

    • In WordPress, go to Users > All Users.
    • Ensure your user role is set to admin.

Installing the GTM 4 WP Plugin

Step 2: Add and Activate the Plugin

  1. Install Plugin:

    • Go to the Plugins section in WordPress and click Add New.
    • Search for "GTM for WP" by Thomas Gregor.
    • Click Install Now and then Activate.
  2. Configure Plugin:

    • Go to Installed Plugins and click on Settings under GTM for WP.
    • Obtain your GTM Container ID from GTM's admin page.
    • Paste the Container ID into the plugin settings and save changes.
    • Ensure the container code remains set to "on" and save again if necessary.

Configuring Google Tag Manager Container

Step 3: Set Up GTM for E-Commerce Events

  1. Preview Setup:

    • In GTM, go to the Workspace tab and click Preview.
    • Connect the debug window to your website to monitor events.
  2. Verify Installation:

    • Ensure the tag is firing correctly. The tag ID should be green or blue, not red or yellow.

Step 4: Track View Item Events

  1. Enable E-Commerce Tracking:

    • In WordPress, go to Integrations and select Track E-Commerce Events.
    • Save changes.
  2. Test Data Layer:

    • Visit a product page on your website.
    • Check the debug window for a view item event with details like currency and item ID.

Setting Up Conversion Actions in Google Ads

Step 5: Create a New Conversion Action

  1. Google Ads Configuration:
    • Go to Google Ads and select Goals > Summary.
    • Click New and choose Website.
    • Enter your website URL and click Scan.
    • Choose Manual Setup and categorize the event as Other.
    • Name it View Item and adjust settings as needed.
    • Save and continue to get the conversion ID and label.

Creating Tags in Google Tag Manager

Step 6: Add Conversion Linker and Trigger

  1. Add Conversion Linker:

    • In GTM, create a new tag for Google Ads Conversion Linker.
    • Set it to fire on all pages and save.
  2. Create Trigger for View Item Event:

    • Go to Triggers and create a new Custom Event trigger.
    • Name it View Item and set the event name to view_item.

Step 7: Set Up Variables

  1. Create Data Layer Variables:
    • For currency: ecommerce.currency
    • For value: ecommerce.value
    • For items array: ecommerce.items

Step 8: Add Conversion Tracking Tag

  1. Configure Tag:

    • In GTM, create a new Google Ads Conversion Tracking tag.
    • Use the conversion ID and label from Google Ads.
    • Set the value, currency, and items from the data layer variables.
    • Name and save the tag.
  2. Add Remarketing Tag:

    • Create a Google Ads Remarketing tag.
    • Enable dynamic remarketing and set the event to view_item.
    • Use the same variables for value and items.
    • Name and save the tag.

Testing and Verifying Tags

Step 9: Test Tags in Debug Mode

  1. Open Debug Window:
    • Visit a product page and ensure the view item event fires.
    • Check the tag assistant for correct firing and data transmission.

Conclusion and Next Steps

Step 10: Publish Changes

  1. Publish in GTM:
    • Once verified, publish the changes in GTM with an appropriate version name and description.

By following these steps, you'll successfully set up Google Tag Manager to track view item events and conversions on your website, ensuring your Google Ads campaigns are optimized and efficient.