WooCommerce Google Analytics Integration

Google Analytics is a free web analytics tool. The free WooCommerce Google Analytics Integration connects your store to your Google Analytics account to provide basic eCommerce and site analytics, using enhanced eCommerce tracking to provide valuable metrics on your store’s performance.

For advanced Google Analytics features, we recommend the WooCommerce Google Analytics Pro version.

Not sure if you need the free plugin or the Pro version? Check out our comparison here.

Note: WooCommerce Google Analytics does not yet support Google Analytics 4 properties, but it still works fine for UA properties. Click here for more info.

Installation ↑ Back to top

  1. Download the extension from your WooCommerce.com > My Account > Downloads
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
  3. Click Install Now, and then Activate
  4. Click the Connect WooCommerce to Google Analytics link and read the next section to learn how to set up and configure the plugin.

Setup and Configuration ↑ Back to top

Google Analytics Setup ↑ Back to top

Enable Ecommerce for a view within Google Analytics for transaction data to be recorded.

  • Set Enable Ecommerce to ON.
  • Set Enable Enhanced Ecommerce Reporting to ON.
  • Click Save.
  • Set Enable Ecommerce to On. Set Enable Enhanced Ecommerce Reporting to on. Click save.

Configure the plugin by going to WooCommerce > Settings > Integrations. You will see ‘Google Analytics’ listed as an option. Click this to see the settings.

WooCommerce Integration Settings ↑ Back to top

Tracking Options

  • Enable Standard Tracking: Check this box to add basic website tracking. This is needed if WooCommerce Google Analytics Integration is the only Google Analytics plugin on your site. If you are using another Google Analytics plugin for your site, leave this box unchecked.
  • “Display Advertising” Support: Check this box if you intend to run ads on the Google Display Network and would like these tracked in your analytics account.
  • Use Enhanced Link Attribution: This setting improves the accuracy of your In-Page Analytics report by differentiating between several links to one URL on a single page. Check this box if you have multiple links to the same URL and want to understand which are clicked more often.
  • Enable Universal Analytics: Universal Analytics is the new standard for Google Analytics. Check this box if you have not used Google Analytics on this site before. If you have used it before, upgrade to Universal Analytics. 
  • Anonymize IP addresses: This keeps user data more private and is mandatory in some countries. Read more about IP Anonymization.  Consult an expert if you’re unsure about whether this is required for your store.
  • Track 404 (Not found) Errors: This allows you to find broken or dead links. To see how many times this occurs, go to your Google Analytics account > Behavior > Events > Overview > Error.
  • Purchase Transactions: Track purchases on your site, including data like revenue, tax, refunds, shipping, and more. This requires a payment gateway that redirects to the thank you/order received page after payment. Some popular options that do this are Stripe, Braintree for WooCommerce, PayPal Checkout, and Square.
  • Add to Cart Events: Track when customers add a product to their cart. This allows you to see more specific details about your customers’ experience and better understand where they might be dropping off.

Setting up Google Analytics goals and funnels ↑ Back to top

Visit Google Support for more information and best practices on goals and funnels for your WooCommerce site.

Testing Analytics ↑ Back to top

If you would like to test the tracking and make sure it’s sending over the correct data to Google, you can use the Google Tag Assistant tool for Chrome. This will analyze the tracking code which has been added to your page and notify you of any warnings or errors.

Keep the following points in mind:

  • Pageviews are not tracked for logged in admin users (so make sure you are logged out)
  • Multiple tracking code instances on the same page can cause issues
  • Tracking can take a while to show up in your Google Dashboard (it’s recommended to wait 24 hours or try the real time tracking reports)
  • Any JavaScript errors on the page could prevent tracking from occuring (you can use the browser tools to check if there are any errors showing up in the console)
  • Confirm there are no browser extension / ad blockers which would block the tracking

If you are experiencing any warning/errors or there are multiple tracking instances found on your page. The best way to track down where this is coming from would be to do a conflict test. You can find a more detailed explanation on how to do a conflict test here.

Disabling pageview ↑ Back to top

By default, this plugin always adds pageview tracking for Google Analytics. When using this plugin with other Google Analytics plugins it may be required to disable the pageview tracking code. This can be achieved using a wc_google_analytics_send_pageview filter. It needs to be set to false. This is an advanced feature please proceed with caution. In case of issues please check the  Testing Analytics section.

About Google Analytics 4 ↑ Back to top

Prior to October 14, 2020, Universal Analytics (UA) properties where the default property type for websites added to Google Analytics accounts. Now, when creating a new property, it defaults to Google Analytics 4, which doesn’t yet work with this extension.

Google still provides the option to create Universal Analytics (UA) properties during set up, provided users toggle “Show Advanced Options”, and such property types continue working with the extension as described.

Click on “Show advanced options” when creating a new property, and toggle the “Create a Universal Analytics property” on.

Note: While it is possible to enter one of the new Google Analytics 4 Measurement IDs for the Google Analytics ID setting, and analytics.js code will even load on the site, nothing will be tracked.

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top