Works with your stack
Cookie consent for Google Analytics for WooCommerce
europe only, by default
Google Analytics for WooCommerce adds the Google tag to your shop with consent defaults of its own. Those defaults only cover European visitors. Cookie Rocks holds the tag until the visitor agrees.
By WooCommerce, Inc. · woocommerce.com · WordPress.org
Is this your product? Tell us if anything here is out of date. Write to us
Google Analytics for WooCommerce
WordPress plugin
- Tested version
- 2.4.4
- How
- Tested automatically around each Cookie Rocks version
- Last test
- 7 November 2026
- Latest version
- 2.4.4 tested
- Active installs
- 100,000+
What Google Analytics for WooCommerce adds to your visitors’ browser
Trackers it loads
- Google Analytics / Google Ads (gtag.js) →Statistics, Marketing1 browser storage key
Cookies seen in our test
sbjs_migrationssbjs_current_addsbjs_first_addsbjs_currentsbjs_firstsbjs_udatasbjs_session_ga_<ID>_ga
What matters for consent with Google Analytics for WooCommerce
Defaults for Europe only
The plugin denies storage by default only for visitors in Europe. Elsewhere it sets no default, so Google treats storage as granted. A filter in the plugin removes its defaults, to leave them to your consent plugin.
Held until the choice
In basic Consent Mode, the Cookie Rocks default, the Google tag from this plugin is held until consent. After Accept all, Google Analytics sets its cookies. The plugin sends nothing from the server.
It reads WP Consent API
The plugin reads WP Consent API in the browser and sends the Consent Mode update itself. Its script loads in the footer, so the tag first runs with the plugin’s own defaults.
Advertising features on
Google signals follow the display advertising setting, which is on by default. Switch it off if you do not use Google’s advertising features.
Cookie Rocks with Google Analytics for WooCommerce
- Holds the scripts it adds to your pages, such as tags, pixels or a chat, until the visitor consents. In advanced Consent Mode, Google’s tags load with consent denied instead.
What our tests found on Google Analytics for WooCommerce
Good to know · Google Analytics for WooCommerceCookie Rocks holds the Google tag of Google Analytics for WooCommerce
In basic Consent Mode (the default), after Accept all, _ga and _ga_<ID> are set, alongside WooCommerce's sbjs_ cookies. The plugin sends nothing from the server.
Seen in our tests, 17 October 2026, Google Analytics for WooCommerce 2.4.3. Source
Full detail
In basic Consent Mode, the Cookie Rocks default, the Google tag added by Google Analytics for WooCommerce is held until consent; after Accept all, _ga and _ga_<ID> are set, alongside WooCommerce's sbjs_ attribution cookies. The plugin sends nothing from the server.
Depends on a setting · Google Analytics for WooCommerceGoogle Analytics for WooCommerce sets denied defaults only in 32 regions
setting “woocommerce_ga_gtag_consent_modes (filter)” · by default: denied in 32 regions
- In the EU, EEA, UK and Switzerland, storage defaults to denied before gtag.js.
- Elsewhere it sets no default, so Google treats storage as granted.
- Its code replaces any existing gtag() function.
- gtag.js loads on every public page once an ID is entered; administrators are never tracked.
Read in its code, 16 October 2026, Google Analytics for WooCommerce 2.4.3.
Full detail
Google Analytics for WooCommerce prints its own gtag('consent','default') before gtag.js: analytics_storage, ad_storage, ad_user_data and ad_personalization denied, wait_for_update 500, limited to 32 regions (EU, EEA, UK, Switzerland). Elsewhere it sets no default, so Google treats storage as granted. Its inline script declares a global function gtag(), replacing any existing one. Returning an empty array from the woocommerce_ga_gtag_consent_modes filter removes its defaults. gtag.js loads on every public page for non-admin visitors once an ID is entered; administrators are never tracked.
Depends on a setting · Google Analytics for WooCommerceGoogle Analytics for WooCommerce turns on Google signals by default
setting “Display advertising (ga_support_display_advertising)” · by default: yes
Google signals follows the display advertising setting, which is on by default. Its opt-out function runs only if the site calls it. The sbjs_ cookies come from WooCommerce, not this plugin.
Read in its code, 16 October 2026, Google Analytics for WooCommerce 2.4.3.
Full detail
In Google Analytics for WooCommerce, allow_google_signals follows the display advertising setting, which is on by default, so Google signals (advertising features) are enabled unless turned off. A gaOptout() function writing ga-disable-<ID> until 2099 exists but runs only if the site calls it. The plugin's code contains no sbjs_ cookie: those come from WooCommerce order attribution.
Good to know · Google Analytics for WooCommerceGoogle Analytics for WooCommerce reads WP Consent API only from the footer
Statistics and marketing consent are sent to Google at load and on each change. Until that footer script runs, gtag.js runs with the plugin's defaults. With no consent type declared, it sets optin.
Read in its code, 16 October 2026, Google Analytics for WooCommerce 2.4.3.
Full detail
Google Analytics for WooCommerce reads WP Consent API in the browser from main.js, loaded in the footer: statistics drives analytics_storage, marketing drives ad_storage, ad_user_data and ad_personalization, sent with gtag('consent','update') at load and on each wp_listen_for_consent_change. If no consent type is declared it sets window.wp_consent_type = 'optin'. Between the head config and main.js, gtag.js runs with the plugin's defaults. Its WP Consent API registration filter names includes/class-wc-google-analytics.php instead of the main plugin file.
How we test it
Around each version, with its latest release
Around each Cookie Rocks version, a fresh WordPress installs its latest version from WordPress.org next to Cookie Rocks and runs the same checks. A new version joins the next run on its own.
- Google Analytics for WooCommerce 2.4.4, tested on 7 November 2026.
- The banner shows, the trackers of the test page wait for consent and load after it, and Cookie Rocks raises no PHP error.
- Its own tags, set with a test ID, do not load before the choice and load after “Accept all”.
- Settings of the test: Google Analytics 4 ID (test value), with WooCommerce.
- Last run: Google Analytics for WooCommerce 2.4.4 on 7 November 2026, with WordPress 7.1.3.
Other plugins of the same kind.
Questions
Where do the sbjs_ cookies come from?
From WooCommerce itself, through its order attribution feature. This plugin’s code does not set them.
What happens after the 30-day trial?
The banner, your visitors’ choices and your proofs of consent keep working. Without a key, most settings lock, updates and support stop. Take a key at any time and everything opens again.
For WooCommerce shops
Keep your shop reports, hold the tag.
the shop stays measured
Every feature of the complete plugin for 30 days, no card. Google Analytics for WooCommerce keeps working as it does today.
- During the trial: everything, including the full settings and the scans
- After 30 days without a key: the banner, your visitors’ choices and your proofs of consent keep working
- What waits for a key: most settings, updates and support

Get your trial key
Your e-mail and your site. Your key arrives as soon as you confirm your e-mail.