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

Related Products

Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.

Advanced discount rules, gift cards, BOGO deals, store credits, dynamic pricing, bulk coupon codes, URL coupons and more with this...