Adding Google Analytics for WooCommerce
Analytics are precious insights into customer behavior when shopping on the digital storefront. Adding Google Analytics is simple enough into WordPress as we covered before, however this method does not work for WooCommerce based sites. This is partially due to the enhanced tracking required for product pages, etc. however this can be worked around.
How to Add Google Analytics to WooCommerce
Adding Google Analytics to WooCommerce is as simple as following these steps.
Step One: Have a Google Analytics Property setup for Ecommerce
First, ensure that there is a dedicated Google Analytics property for the storefront/site you wish to track. This property should have Enhanced Ecommerce Reporting enabled as well. If help is required checkout our article on Setting Up Google Analytics.

Step Two: Login to the WordPress Dashboard
Next go ahead and login to the WordPress admin panel.

Step Three: Download WooCommerce Google Analytics Integration Plugin
Once logged in, navigate to WooCommerce > Extensions, and search for the WooCommerce Google Analytics Integration Plugin. This is a WooCommerce officially supported plugin which means that it will work well with the digital storefront. Install and activate this extension before continuing.

Step Four: Input Tracking Code and Configure
Next, navigate to the left-hand sidebar once more and go select WooCommerce > Settings. One the page loads click on the tab labeled Integrations and then once that page loads select Google Analytics. Finally simply grab the tracking code from the Google Analytics Property, this can be either a GA4 or UA property, and paste it into the section requiring an ID. Check to make sure all options are selected that need to be selected (by default just select all of them) and then hit Save Changes down at the bottom of the page.

Conclusion
It is slightly frustrating that Site Kit or even inputting the code manually with a tag manager and Metronet as we discussed in our previous article does not work with WooCommerce. The use of these analytics as well as a Facebook Pixel may require the use of a cookie notice as well as a data usage policy depending on regionality and those laws. If a cookie notice for GDPR/CCPA compliance is necessary we have an article on setting up a free one here. Either way Google Analytics should now be populating with e-commerce data directly from WooCommerce.