Google Analytics 3 / Universal Analytics – Enhanced Ecommerce tracking – How to setup?
WARNING!
Universal Analytics was turned down by Google. It is not recommended to setup this ecommerce tracking on new WooCommerce sites. Setup Google Analytics 4 ecommerce tracking instead. If you are on Google Analytics 360 and wants to keep using Universal Analytics tags in Google Tag Manager, this page will give you the steps to setup ecommerce tracking with Universal Analytics as long as it collects data for you.
This guide does not take into account weather you are using a Consent Management Platform (CMP) or how you would like to implement Google Consent Mode within your Google Tag Manager container. The steps to also make your measurement setup also privacy safe is usually dependent on your CMP. Consult with the support team of your CMP.
Step 1 – Setup GA4 ecommerce tracking
Setup your Google Analytics 4 ecommerce tracking witch will be the basement to create your Universal Analytics ecommerce tracking.
Step 2 – Create a Google Analytics Settings variable
If you did not set this up earlier, create a new variable with the type Google Analytics Settings:
Set your Tracking ID either by selecting another variable or by entering your UA-88888-8 property ID manually.
Set your tracking options in Fields to set depending on your measurement and reporting needs also taking into consideration user privacy protection.
Do NOT enable ecommerce tracking related features in this variable!
Step 3 – Make sure you have page view tracking setup
Make sure to create a Universal Analytics tag to collect the page view interaction (this tag might be already in your GTM container):
Set Track type to Page View and select the previously created Google Analytics Settings variable.
If you need, override some settings but do not enable ecommerce tracking in this tag!
It is usually a good idea to fire this tag on the Initialization – All pages trigger to make sure page view tracking happens as early as possible but this will not guarantee that the page view data will arrive at Google before any other event.
Step 4 – Setup ecommerce tracking
Create a new Universal Analytics tag to setup ecommerce tracking:
Set the Track Type to Event, then enter any value into the category and action parameters. It is not relevant what you type in here as event reports will be not used to analyze ecommerce data, it will be just sort of the messenger that will also store ecommerce specific data for the ecommerce specific reports.
Select the Google Analytics Settings variable you created in Step 2 and check the Enable overriding settings in this tag checkbox. Open More settings > Ecommerce and set Enable Ecommerce Ecommerce Features to true. Turn on checkboxes Use Data Layer and Use GA4 schema.
Select the ecommerce trigger created for Google Analytics 4 ecommerce tracking and save the tag.
Publish your changes and you are done!