WooCommerce Google Analytics Integration

Description

This plugin provides the integration between Google Analytics and the WooCommerce plugin. You can link a referral to a purchase and add transaction information to your Google Analytics data. It also supports the new Universal Analytics, eCommerce, and enhanced eCommerce event tracking.

Starting WooCommerce 2.1, this integration will no longer be part of WooCommerce and will only be available by using this plugin.

Contributions are welcome via the GitHub repository.

Screenshots

  • Google Analytics Integration Settings.

Installation

  1. Download the plugin file to your computer and unzip it
  2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation’s wp-content/plugins/ directory.
  3. Activate the plugin from the Plugins menu within the WordPress admin.
  4. Don’t forget to enable e-commerce tracking in your Google Analytics account: https://support.google.com/analytics/answer/1009612?hl=en

Or use the automatic installation wizard through your admin panel, just search for this plugins name.

FAQ

Installation Instructions
  1. Download the plugin file to your computer and unzip it
  2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation’s wp-content/plugins/ directory.
  3. Activate the plugin from the Plugins menu within the WordPress admin.
  4. Don’t forget to enable e-commerce tracking in your Google Analytics account: https://support.google.com/analytics/answer/1009612?hl=en

Or use the automatic installation wizard through your admin panel, just search for this plugins name.

Where can I find the setting for this plugin?

This plugin will add the settings to the Integration tab, to be found in the WooCommerce > Settings menu.

I don’t see the code on my site. Where is it?

We purposefully don’t track admin visits to the site. Log out of the site (or open a Google Chrome Incognito window) and check if the site is there for non-admins.

Also please make sure your Google Analytics ID under WooCommerce -> Settings -> Integrations.

My code is there. Why is it still not tracking sales?

Duplicate Google Analytics code causes a conflict in tracking. Remove any other Google Analytics plugin or code from your site to avoid duplication and conflicts in tracking.

Can I install it already?

Starting the WooCommerce 2.1 release, the Google Analytics integration for WooCommerce is no longer part of the WooCommerce plugin.

Until you’ve updated to WooCommerce 2.1, this plugin puts itself in some sort of hibernate mode.

You can leave this plugin activated and it will seamlessly take over the integration that once was in the WooCommerce plugin, once you update to the next version.

My national data privacy laws require that I offer an opt-out for users, how can I do this?

Include the following html code snippet within the page where you want to have the opt-out, e.g. the your Imprint our Data Privacy page:

Exact wording depends on the national data privacy laws and should be adjusted.

Reviews

It Works, No Issues

It does what it’s supposed to do. I have not had any problems with it. It has been installed in multiple sites for over a year without issue.

Works! Tracking Sales Conversions

After reading the other reviews I was hesitant to install this plugin, but I went ahead anyway and it seems to be working perfectly! Thank you, Woocommerce. This is just what I needed to start tracking sales conversions and other site activity in Google Analytics.

Fix for wc-3.0.8 enhanced mode

The original version is not working with the recent woocommerce versions, but I was able to fix it, here’s the link to download the fixed version:
https://www.dropbox.com/s/3xqfp5o7lbsu3mf/woocommerce-google-analytics-integration-fixed-wc-308.zip?dl=0

I tested it and I’m using it with the enhanced option, Woocommerce 3.0.8. I’m not sure if it also works on the regular ecommerce mode.

Janky

Just stopped tracking on a clients site for several weeks – huge fail guys! – and now with the Storefront 2.2.3 update it’s the culprit in a bug that exposes the add_to_cart button jQuery on the template-homepage.php file. For this plugin to have been updated 2 weeks ago and still only be compatible up to WP 4.5.9 is unacceptable from a WooCommerce plugin. Sorry, uninstalling.

Read all 61 reviews

Contributors & Developers

“WooCommerce Google Analytics Integration” is open source software. The following people have contributed to this plugin.

Contributors

“WooCommerce Google Analytics Integration” has been translated into 3 locales. Thank you to the translators for their contributions.

Translate “WooCommerce Google Analytics Integration” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.4.3 – 15/06/2017

  • Fix – WC 3.x notice by using proper variation data.
  • Add – Option to track 404 (Not found) errors.

1.4.2 – 09/05/2017

  • Fix – Missing Google Analytics ID.

1.4.1 – 01/05/2017

  • Add – Filters for GA snippet (woocommerce_ga_snippet_head, woocommerce_ga_snippet_create, woocommerce_ga_snippet_require, woocommerce_ga_snippet_output)
  • Add – Option to toggle on/off Enhanced Link Attribution
  • Fix – JavaScript break by wrapping it in quotes
  • Fix – Use ID and SKU data in a consistent way so that all products are correctly tracked.
  • Fix – Updates for WooCommerce 3.0 compatibility.
  • Add – Settings link to the plugin in the Plugins screen
  • Fix – Fatal error on shortcode usage for empty product

1.4.0 – 20/11/2015

  • Feature – Support for enhanced eCommerce (tracking full store process from view to order)
  • Tweak – Setting up the plugin is now clearer with some helpful links and clearer language
  • Tweak – New filter on the ga global variable
  • Refactor – JavaScript generation functions have been moved to their own class

1.3.0 – 12/11/2014

  • Feature – Added the transaction currency in the tracking code
  • Feature – Add data privacy option that are mandatory in some countries
  • Tweak – Moved the tracking code to the head of the page
  • Tweak – Remove the “SKU” prefix to the sku for addItem
  • Refactor – Integration class reformulated

1.2.2 – 15/10/2014

  • Feature – Adding option to anonymize IP addresses
  • Feature – Adding gaOptOut function to be called from any page for OptOut

1.2.1 – 17/09/2014

  • Tweak – Adding utmnooverride to return url for Google Adwords

1.2.0 – 28/07/2014

  • Feature – Adding display advertising parameter to Universal Analytics
  • Fix – Using get_total_shipping() instead of get_shipping
  • Fix – Using wc_enqueue_js() instead of $woocommerce->add_inline_js(
  • Tweak – Updating plugin FAQ
  • Tweak – Adding parenthesis for clarity

1.1 – 29/05/2014

  • Added option to enable Display Advertising
  • Added compatibility support for WooCommerce 2.1 beta releases

1.0 – 22/11/2013

  • Initial release