Google Analytics for WooCommerce

About Google Analytics for WooCommerce
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 supports Global Site Tag (GA4) and eCommerce event tracking.
Please visit the documentation page for additional information.
Contributions are welcome via the GitHub repository.
Quick facts
Contributors
WooCommerce, Automattic, Claudio Sanches, Boro Sitnikovski, royho, laurendavissmith001, Chris Shultz, mmjones, Tomek, Ján Mikláš
How Sourcemap Explorer detects Google Analytics for WooCommerce
Google Analytics for WooCommerce sits at v2.4.0 with 100K+ active installs, a 2.8/5 rating from 119 reviews, tested up to WordPress 7.0.3. Its last wp.org update landed 2026-08-06 10:20am GMT, and it has been on the directory since 2013-11-25. Whatever the install count, every site running it serves the plugin's files from the same predictable location — and that is the signal Sourcemap Explorer reads.
WordPress plugins all load assets from a predictable path: /wp-content/plugins/<slug>/. Sourcemap Explorer enumerates every such URL on the rendered page (script tags and stylesheets) and pulls the version from the ?ver= cache-buster query parameter when WordPress emits one. The slug is then cross-referenced against the wordpress.org plugin directory to attach the human-readable name, author, install count, rating and changelog you see on this page.
- 1
Find /wp-content/plugins/woocommerce-google-analytics-integration/ in the Network tab
Open DevTools → Network → reload the page. Filter by "JS" or "CSS" and look for asset URLs starting with `/wp-content/plugins/woocommerce-google-analytics-integration/`. Each match confirms the plugin is loading on the page. Sourcemap Explorer enumerates every plugin path automatically and lists each one in the popup's Stack tab.
- 2
Read the version from the ?ver= query string
WordPress appends the plugin version as a cache-busting query parameter to its asset URLs (`?ver=2.4.0`). Sourcemap Explorer pulls this version directly. The version on this page (2.4.0) is the latest published on wp.org — the version on a real site may lag.
- 3
Cross-reference with wp.org for human-readable metadata
Once the plugin slug is identified, fetch `https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=woocommerce-google-analytics-integration` to read the human-readable name, author, install count, rating and changelog. This page already does that for you.
Plugin ecosystem context
Extends WooCommerce, the dominant WordPress e-commerce engine. Plugins in this lane typically interact with the cart, checkout, payment or shipping pipelines, and ship JavaScript that runs alongside WooCommerce's own client-side stack. Within that group, Google Analytics for WooCommerce (100K+ active installs) is tagged google analytics, woocommerce on wp.org.
Screenshots

Installation
- Download the plugin file to your computer and unzip it
- Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation’s wp-content/plugins/ directory.
- Activate the plugin from the Plugins menu within the WordPress admin.
- 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.
FAQ
This plugin will add the settings to the Integration tab, found in the WooCommerce Settings menu.
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.
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.
Changelog
2.4.0 – 2026-08-06
- Dev – Run the PHP coding standards job when dependencies change.
- Dev – Update WPCS to 3.4.1 to pick up the fix for GHSA-3pwp-g2mj-5p3v.
- Update – Bump the minimum required WooCommerce version to 10.9 and the compatibility version to 11.0.
2.3.0 – 2026-06-25
- Update – Require WooCommerce 10.8+.
2.2.1 – 2026-06-22
- Dev – Fix E2E tests against current WooCommerce shipping and checkout behavior.
- Dev – Update vulnerable npm development dependencies.
- Fix – Prevent a fatal TypeError on PHP 8 when a cart item, order line, or product loop references a product that no longer resolves to a WC_Product.
2.2.0 – 2026-06-09
- Add – Add a read-only Google Analytics tracking settings ability.
- Add – Expose JavaScript tracking formatters and utilities for custom integrations.
- Add – Track checkout shipping and payment info events.
- Dev – Add CodeRabbit configuration and ignore .claude/settings.local.json.
- Dev – Add focused unit coverage for asset metadata and tracking settings snapshots.
- Dev – Add product formatter unit coverage.
- Dev – Enable min-release-age supply-chain protection requiring npm >=11.10.0.
- Dev – Expand purchase event E2E coverage for transaction and order totals.
- Dev – Remove deprecated Products (Beta) block from E2E test coverage; Product Collection coverage supersedes it.
- Dev – Store Google Analytics tracking settings on the tracking instance.
- Dev – Update npm dependencies and transitive overrides to resolve non-breaking security advisories.
- Dev – Update npm development dependencies for security fixes.
- Fix – Ensure all settings defaults are populated in
$this->settingson fresh activation, preventing undefined array key notices. - Fix – Persist add_to_cart event across cart redirect.
- Fix – Price minor-unit rounding.
- Fix – Rename misspelled public method
enquque_tracker()toenqueue_tracker(); keep deprecated alias for backward compatibility. - Fix – Track Store API add-to-cart events without duplicate analytics events.
- Fix – Track Store API cart quantity decreases as remove_from_cart events.
- Fix – Track classic add_to_cart events without a button when single-product data is available.
- Fix – Track view_item_list, add_to_cart, and select_content events correctly when the cart is empty and products are rendered via a Product Collection block.
- Fix –
item_list_idanditem_list_nameinview_item_listGA4 events now reflect the actual page context (shop, category, tag, search) instead of hardcoded placeholder values. - Tweak – Improve tracking payload limits, cart event binding, and linker domain validation.
- Tweak – Remove the compatibility declaration for the product editor beta, which is being retired in WooCommerce 11.0.
- Tweak – WC 10.8 compatibility.
- Tweak – WP 7.0 compatibility.
- Update – Declare compatibility with WordPress 7.0 while requiring WordPress 6.9 or newer.
- Update – Format product categories in parent-first hierarchy order.
- Update – Require WooCommerce 10.7+.
- Update – Use get_order_number() for transaction_id.
2.1.23 – 2026-04-15
- Dev – Enable min-release-age supply-chain protection.
- Dev – Override serialize-javascript to ^7.0.5 and ajv to ^8.18.0 to resolve npm security vulnerabilities.
- Update – Require WooCommerce 10.6+.
Keep reading on Sourcemap Explorer
Practical guides
Detection deep dives
Alternative tools
Detected by Sourcemap Explorer
We enumerate every /wp-content/plugins/woocommerce-google-analytics-integration/ path on the page, and pull the version from the ?ver= query string when WordPress emits one (wp.org currently lists v2.4.0, updated 2026-08-06 10:20am GMT).