Skip to content

Works with your stack

Cookie consent for Google Analytics for WooCommerce

europe only, by default

← Cookie Rocks for your stack

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
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

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.

All the features

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 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.

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.

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

How the trial works, in detail

Get your trial key

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

One trial per domain. Local and staging sites never use up your key.

We keep your e-mail address to send your key and help you with it, as explained in our privacy policy. No newsletter, nothing else.