Google Tag Manager for WooCommerce PRO

Google Tag Manager for WooCommerce PRO is independent integration for Google Tag Manager offering premium compatibility with WooCommerce Themes and Extensions. It covers full eCommerce funnel, supporting variable products, different cart and checkout implementations. It comes with packages GTM presets – JSON files that can be imported into GTM workspace that include all required variables, triggers and tags.

How to install and configure the plugin?

↑ Back to top

1. Install & activate the plugin

↑ Back to top

Start in your WordPress Dashboard, navigate to Plugins > Add New. Upload the plugin zip file obtained from WooCommerce Marketplace. Install and activate the plugin.

2. Install Google Tag Manager

↑ Back to top

Now it’s time to embed the main Google Tag Manager snippet to your WooCommerce shop. If you haven’t done it before using another plugin or directly in the theme code you can navigate to Settings > Google Tag Manager and fill in two text areas at the top of the settings. The snippets to paste in those fields can be found in Admin pane in Google Tag Manager. Go to Container > Install Google Tag Manager.

This will show you two fields to copy code from and paste in respective fields in WordPress Dashboard.

Once pasted scroll down and hit Save Settings.

3. GTM integration is live and accepting events

↑ Back to top

After the GTM snippets are saved the plugin will start pushing events to DataLayer and Google Tag Manager.

Now it’s time to configure Google Tag Manager to forward this data to selected tools. We know this may be a cumbersome activity to create all GTM Tags, Triggers and Variables one by one manually, that’s why our plugin comes with handy presets that are easy to import in few simple steps to any GTM container.


How to import any GTM container preset?

↑ Back to top

This is a general guide on how to import any GTM container preset provided by Google Tag Manager for WooCommerce plugin. Each preset comes with dedicated documentation that details how to configure it.

1. Download preset for selected tool

↑ Back to top

First go to Settings > Google Tag Manager and click GTM Presets tab. You will find all the presets there.

IMPORTANT: the list of available presets depends on the version (FREE vs PRO) of the plugin that you use.

Find a preset for a service that you want to integrated and click Download. This will download small JSON file.

2. Import preset in Google Tag Manager

↑ Back to top

In Google Tag Manager go to the Admin tab of your workspace. Click Import Container. Choose the container file you have just downloaded. Decide which workspace it should go to. Then select Merge and Overwrite conflicting tags, triggers and variables. as import options.

Once you are sure you have the correct options selected hit Confirm to create Tags, Variables, and Triggers.

3. Review the changes and publish it

↑ Back to top

When the container preset is imported, changes will be applied to your GTM Workspace, but they won’t be deployed to end-users yet. This allows you to review all changes and apply any required modifications before publishing new integration.

To make things clear all tags, triggers and variables from presets are assigned to respective GTM Folders with the name of the preset (some presets may create in two folders if they are more complex).

Most of the presets will require at least one manual change which will be setting an ID of the service to integrate with (e.g. GA4 Measurement ID ). You will usually find them as one of the Variables, but please check documentation specific for your preset.

Once all the required changes are done you can hit Submit and type in your change description.


How to integrate Google Analytics GA4 with WooCommerce?

↑ Back to top

This is an example guide to showcase GTM preset installation on specific integration. Most presets come with dedicated documentation and guide.

1. Install and configure Google Tag Manager for WooCommerce plugin

↑ Back to top

First, make sure that Google Tag Manager for WooCommerce plugin is up and live in your WooCommerce shop.

You can follow this guide in case of doubts.

2. Prepare GA4 property

↑ Back to top

Next prepare a new GA4 property and obtain the GA4 Measurement ID.

Go to your GA4 property, click the gear icon in the bottom left, and select Data Streams. If you haven’t done that before you will need to create a new Web stream. Once you are in the correct stream, copy the Measurement ID.

3. Download GA4 preset

↑ Back to top

After that navigate back to your WordPress instance and go to Settings > Google Tag Manager. These are the settings of our plugin and when you click GTM Presets tab you will see all available presets. Select Google Analytics 4 (Advanced) and click Download. That will download and save ga4-advanced.json file to your computer.

4. Import GA4 preset

↑ Back to top

The next step is to import the preset you have just downloaded into your GTM Workspace.

Navigate to GTM Workspace and go to Admin > Import container. In the new screen select the ga4-basic.json file and your Workspace (usually default one). Next select Merge as the import option and Overwrite conflicting tags, triggers and variables. as the sub-option. It’s very important to make sure those two options are selected.

Import screen gives you a quick way to preview all the changes import will make to your workspace. Now you can click Confirm. This will bring the changes as draft so you will have opportunity to review and adjust everything before going live.

5. Update GTM container

The last step is to find the GA4 Measurement ID variable. It can be found on the overview screen that shows all the changes you have just imported, or on the Variables list.

Open this variable and edit it’s value pasting the Measurement ID for your GA4 property.

6. Publish changes

↑ Back to top

You can confirm data is tracked in GA4 realtime screen. It make take few moments before all changes will be deployed.

Realtime view of ecommerce data in GA4

Events Reference

↑ Back to top

Events

↑ Back to top

These are all supported events that are being tracked by the WooCommerce plugin for classic Google Tag Manager web container from the browser. Please note that some events may not be tracked correctly in all scenarios depending on your theme configuration.

Event nameDescriptionPropertiesSupported plugins
languageWhen a user visits site.– language (iso code)WooCommerce Multilingual, WPML, Polylang
change_languageWhen a user switches from one language to another.– previous (language iso code)
– current (language iso code)
WooCommerce Multilingual, WPML, Polylang
change_currencyWhen a user switches from one currency to another.– previous (currency iso code)
– current (currency iso code)
WooCommerce Multilingual
view_item_listWhen list of products is viewed by user. It can be category product listing or related products on single product page.– value
– items
WooCommerce Wishlists, WPC Smart Wishlist
select_itemWhen a product is selected (clicked) in a products list.– value
– items
view_itemWhen a single product page and details are viewed.– value
– items
WooCommerce Quick View
add_to_wishlistWhen a product is added to a wish list.– value
– items
WooCommerce Wishlists, WPC Smart Wishlist
remove_from_wishlistWhen a product is removed from a wish list.– value
– items
WooCommerce Wishlists, WPC Smart Wishlist
add_to_cartWhen a product is added to a cart. Can happen on a list or single product page.– value
– items
WooCommerce Quick View, WooCommerce Wishlists, WPC Smart Wishlist
remove_from_cartWhen a product is removed from a cart on a cart page.– value
– items
view_cartWhen cart is viewed.– values
– items
abandon_cart (experimental)When the cart is abandoned – user closes browser or tab while on cart page.– value
– items
being_checkoutWhen first checkout page is visited.– value
– items
abandon_checkout (experimental)When the checkout is abandoned – user closes browser or tab while on checkout page.– value
– items
add_billing_infoWhen billing information is added during checkout.– value
– items
– email
– phone_number
– address
add_payment_infoWhen payment information is added during checkout.– value
– items
– payment_type
add_shipping_infoWhen shipping information is added during checkout.– value
– items
– shipping_tier
purchaseWhen an order confirmation page with transaction details is visited– value
– transaction
– items

Properties

↑ Back to top

These are all properties that are supported by the plugin and tracked for the events documented above.

Items

Property nameDescriptionSupported plugins
item_nameProduct name
item_idProduct id (WooCommerce internal id, can be changed to SKU – learn more here)
priceProduct price (one item)
quantityQuantity of products (applicable to cart, checkout and purchase related events)
item_couponThe coupon applied to the product (if any)
item_variantThe specific variant of the product (e.g., size, color)
item_brandThe brand of the product (if set).WooCommerce Brands, Yith Brands, Yith Brands Premium
item_list_nameThe name of the list or category where the item is displayed
item_list_idThe ID of the list or category where the item is displayed
indexThe position of the item in a list or category (e.g., the order in which it appears in a product list)

Transaction

Property nameDescription
transaction_idUnique transaction id assigned by WooCommerce
affiliationWooCommerce shop name
valueTotal transaction value including tax and shipping (applicable for purchase event only)
taxAmount of tax for the transaction if any.
shippingAmount paid for shipping service.
currencyCurrency of the transaction.
couponPromotional coupon code if used.

Other

Property nameDescription
valueTotal value of all items considered for given eCommerce event (all events with items array except purchase where value is computed differently – see above).

Available GTM Presets

↑ Back to top
  • Google Analytics 4
  • Facebook Pixel Advanced
  • Google Ads Conversion
  • Google Ads Dynamic Remarketing
  • Microsoft UET
  • TikTok
  • Pinterest
  • Consent Mode
  • Google Tag to Server