WooCommerce is by far the most popular ecommerce plugin for WordPress and integrating it with Google Tag Manager and Google Analytics is easy.
Click the activation switch then click save and you are well on your way.
eCommerce events tracked with Google Analytics 4
When the integration is activated the following Google Analytics 4 events are automatically included in the dataLayer:
WooCommerce integration options
If you wish to include the product brand in the data layer you must select the product attribute which conatins the brand value.
By default this attribute does not exist in WooCommerce so you must first create a new brand attribute and once you have done that you can select it in the brand option.
Google Ads Remarketing
I you wish to use Google Ads Remarketing you must select your business type from one on Google’s predefined business verticals:
If your product feed generator is adding a prefix to the product IDs, you can add the prefix to be included it in the Data Layer.
Tax and shipping
Whether prices should include tax or not is a matter of opinion and it’s easy to shitch between the two. It’s alsp matter of opinion whether shipping should be excluded from the revenue.
Events in checkout
Google Analytics 4 has 2 new events in the checkout and they are called
add_payment_info. These events may be usefull for tracking progress in the funnel but it depends entirely on you setup.
Ideally you only want to fire these events once and the options are:
- When the ‘Place order’ button is clicked
- When a shipping/payment method is selected with fallback to the ‘Place order’ button.
- Disable the event.
Ideally you should fire the event when a method is selected but what happens if the user changes the method? In this case only event will be fired but the name of method will be the first chosen method. So the usefullness of these events depends on how you checkout page is structured.
View_item on variable products
A variable product like a shirt has different sizes. Each size has it’s unique product number / SKU. All product variations has a master product where the user can select size. This is a problem with the
If you fire the event on both the master product and when a variation has been selected you will get a higher number of views than expected. If you only fire the event on the master product the will be a gap or missing link when the variation with a different product ID is addeed to the cart.
Theere is no right or wrog here but you have to choose.