WooCommerce Google Analytics Integration


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 Global Site Tag, Universal Analytics, eCommerce, and enhanced eCommerce event tracking.

Starting from WooCommerce 2.1, this integration is not packaged with WooCommerce and is only available by using this plugin.

Contributions are welcome via the GitHub repository.


  • Google Analytics Integration Settings.


  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 plugin’s name.

Часто задаваемые вопросы

Where can I find the setting for this plugin?

This plugin will add the settings to the Integration tab, 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 code is there for non-admins.

Also please make sure to enter 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 plugins or code from your site to avoid duplication and conflicts in tracking.

My settings are not saving!

Do you have SUHOSIN installed/active on your server? If so, the default index length is 64 and some settings on this plugin requires longer lengths. Try setting your SUHOSIN configuration’s «max_array_index_length» to «100» and test again.

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:

You can prevent Google Analytics from tracking you by clicking the following link. An opt-out cookie will be set, which will prevent you being tracked when visiting this website in the future:
<a href="javascript:gaOptout()">Deactivate Google Analytics</a>.

view raw


hosted with ❤ by GitHub

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


21.11.2022 1 ответ
This is the most easiest setup for Google Analytics ever. All it asks for your ID, and it will show up everything on your Google Analytics! On your Global Site Tag, Universal Analytics, eCommerce, and more! No any kind of snippet or codes!
I see the faq about SUHOSIN and maybe that's the cause. I think its possible to create plugins that don't require changes to server config just to save options. And this plugin is as useless as the rest of the analytics plugins if I can't track ecommerce.
23.09.2021 1 ответ
I installed this plugin, configured the settings and it did not work. Didn't even bother to try and figure it out. Deactivated it and removed it from my site.
24.08.2021 1 ответ
Just to confirm that this does work but you need to be logged out of the site admin to see the Analytics code
Посмотреть 91 отзыв

Участники и разработчики

«WooCommerce Google Analytics Integration» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:


«WooCommerce Google Analytics Integration» переведён на 11 языков. Благодарим переводчиков за их работу.

Перевести «WooCommerce Google Analytics Integration» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

1.5.17 — 2022-11-09

  • Add — New Google Analytics task in WC.

1.5.16 — 2022-11-03

  • Add — Declare compatibility for High Performance Order Storage.
  • Tweak — WC 7.1 compatibility.
  • Tweak — WP 6.1 compatibility.

1.5.15 — 2022-10-04

  • Add — Support for a Google Tag ID.
  • Tweak — WC 7.0 compatibility.

1.5.14 — 2022-09-02

  • Dev — Add branch-labels GH workflow.
  • Dev — GH release config and the new PR template.
  • Tweak — WC 6.9 compatibility.

1.5.13 — 2022-08-03

  • Fix — Custom Order table compatibility.

1.5.12 — 2022-07-27

  • Tweak — WC 6.8 compatibility.

1.5.11 — 2022-07-06

  • Tweak — WC 6.7 compatibility.

1.5.10 — 2022-06-07

  • Tweak — WC 6.6 compatibility.

1.5.9 — 2022-05-10

  • Tweak — WC 6.5 compatibility.
  • Tweak — WordPress 6.0 compatibility.

1.5.8 — 2022-02-02

  • Add — Support for Google Analytics cross domain tracking features.

1.5.7 — 2022-01-13

  • Fix — Activation error when WC was disabled.
  • Tweak — WC 6.1 compatibility.

1.5.6 — 2021-12-29

  • Fix — Confirm order key before displaying transaction tracking code.

1.5.5 — 2021-12-09

  • Tweak — WC 6.0 compatibility.
  • Tweak — WP 5.9 compatibility.

1.5.4 — 2021-11-10

  • Fix — Remove the slow order counting query from admin init.
  • Tweak — WC 5.9 compatibility.

1.5.3 — 2021-09-15

  • Tweak — Avoid unnecessary completed orders queries.
  • Tweak — WC 5.7 compatibility.
  • Tweak — WP 5.8 compatibility.

1.5.2 — 2021-07-30

  • Fix — Change utm_source and utm_medium in upsell notice link.
  • Fix — add product links to readme.

1.5.1 — 2021-02-03

  • Tweak — WC 5.0 compatibility.

1.5.0 — 2020-12-17

  • Add — Option to use Global Site Tag and the gtag.js library (for Universal Analytics or Google Analytics 4).
  • Add — Several new values added to the Tracker data.
  • Add — Developer ID for gtag.js and analytics.js.
  • Tweak — Bump minimum-supported WooCommerce version to 3.2.
  • Tweak — Remove deprecated jQuery .click().
  • Fix — Settings link in plugins table row points directly to plugin settings.
  • Fix — Issue with multiple consecutive «Remove from Cart» events sent from the mini cart.

1.4.25 — 2020-11-25

  • Tweak — WC 4.7 compatibility.
  • Tweak — WordPress 5.6 compatibility.

1.4.24 — 2020-10-12

  • Tweak — WC 4.5 compatibility.

1.4.23 — 2020-08-19

  • Fix — Prevent transaction from being tracked a second time when page is reloaded locally or from cache.
  • Tweak — WordPress 5.5 compatibility.

1.4.22 — 2020-06-05

  • Tweak — WC 4.2 compatibility.

1.4.21 — 2020-05-04

  • Tweak — WC 4.1 compatibility.

1.4.20 — 2020-03-29

  • Fix — Change wc_goole_analytics_send_pageview fiter name to wc_google_analytics_send_pageview.