GA4 and Google Ads on WooCommerce: Consent Mode v2 step by step
Set up Google Consent Mode v2 on a WooCommerce shop with Site Kit, Google for WooCommerce or Tag Manager, and check in your browser that it works.
Lukas Kontur · · 8 min read
If your shop runs Google Analytics 4 (GA4) or Google Ads conversion tracking, your cookie banner has two jobs. It has to stop Google cookies until the visitor agrees, and it has to tell Google what the visitor chose. That second part is called Google Consent Mode, and its current version (v2) adds two signals for advertising. This guide walks you through setting it up on WooCommerce and checking that it actually works.
The symptoms
- A scan report says Google services found, but no Consent Mode detected, or reports a Consent Mode mismatch: the banner says "denied", but Google cookies or requests appear anyway.
- In Google Ads, your conversion actions do not show "Consent mode is implemented" in the Diagnostics tab (Google Ads Help).
- GA4 cookies (
_gaand_ga_followed by your measurement ID) are in the browser before anyone clicks the banner.
These are common problems. In our scan of 97,304 EU websites, 13.7% of sites using Google services had no Consent Mode at all, and 11.9% showed a mismatch between the consent state sent to Google and what the browser actually did (full study).
What Consent Mode v2 actually is (in plain words)
Your banner sends Google a small status message, first a default ("nothing allowed yet") and then an update after the visitor clicks. Google lists these signals in its consent mode overview. The four that matter for a shop are below; ad_user_data and ad_personalization are the two parameters Google added for v2 (Google Tag Manager Help: consent mode updates for the EEA):
| Signal | What it controls |
|---|---|
analytics_storage | Analytics cookies, for example GA4's _ga |
ad_storage | Advertising cookies |
ad_user_data | Sending user data to Google for advertising |
ad_personalization | Personalised advertising such as remarketing |
Two rules from Google's setup guide matter most:
- The default must be set on every page before any Google tag sends data. Google warns: "If your consent code is called out of order, consent defaults won't work."
- The update must be sent when the visitor makes a choice, and again on later pages so the choice is remembered.
Google also describes two modes. In basic mode, Google tags are not loaded until the visitor interacts with the banner. In advanced mode, tags load straight away with everything set to "denied" and send cookieless signals. If you do not want any request to Google before a choice, basic mode is the conservative option. Your consent plugin decides which mode you get, so check its settings.
How to check it yourself
- Open a new private window in Chrome and press F12 to open DevTools.
- Go to the Network tab and type
collectinto the filter. Load your shop and do not click the banner. - GA4 requests contain
/g/collect. If you see them, look at the request URL (click it, then Payload or Headers). Agcsparameter means some consent state is being sent. Nogcsat all usually means Consent Mode is not set up. Google says these parameters "may be subject to change" (consent mode overview) and does not publish what each value means, so use step 5 to read the actual state. - Open the Application tab, then Cookies, then your shop's address. If
_gais there before you clicked anything, analytics storage is not being held back. - For a clear answer, use Tag Assistant (tagassistant.google.com). Connect it to your shop, then in Summary select the earliest Consent event and open the Consent tab. The On-page Default column should show "Denied" for the four signals above. Google notes that this tab "is empty when consent mode is not implemented on the page" (Google: troubleshoot with Tag Assistant).
- Click Reject in the banner and check that no
_gacookie appears. Then, in a new private window, click Accept and check that the On-page Update column switches to "Granted".
Why it goes wrong on WooCommerce
- There are several Google tags on the page. Site Kit by Google, Google for WooCommerce, a Google Tag Manager plugin and a theme snippet can each add their own Google tag. Your banner may control one and not the others.
- The consent plugin and the Google plugin do not talk to each other. On WordPress this usually happens through the free WP Consent API plugin. Without it, Site Kit cannot know what the visitor chose.
- The default is set too late. A speed plugin that delays or defers your consent script can let a Google tag run first.
- The default is "granted". Some setups set everything to granted by default and never change it. The banner looks fine, the signals say "allowed".
The fix
Pick the section that matches how Google is installed on your shop. If you are not sure, view the page source (Ctrl + U) and search for gtag( and googletagmanager.com. Every match is a Google tag that needs to be covered.
If you use Site Kit by Google
Site Kit documents its own consent mode switch (Site Kit: consent mode):
- Install and activate the WP Consent API plugin from wordpress.org.
- Install a consent plugin that supports it. Site Kit names Complianz, Cookiebot CMP by Usercentrics and CookieYes.
- In WordPress go to Site Kit, Settings, Admin Settings and switch on consent mode.
- Check the page source for the comment
Google tag (gtag.js) Consent Mode snippet added by Site Kit. If it is there, Site Kit is sending the default.
According to the same page, Site Kit then does not track visitors from the EEA, Switzerland and the UK by default until they consent, and by default it updates consent for the "statistics" and "marketing" categories of the WP Consent API.
If you use Google for WooCommerce
The Google for WooCommerce extension (for Google Ads and Merchant Center) has no banner of its own. Its documentation says visitors from the EEA, UK and Switzerland must grant cookie consent before analytics tracking is activated, and recommends a consent plugin that is compatible with the WP Consent API (WooCommerce docs). So the steps are the same as for Site Kit: install WP Consent API and a supported consent plugin, then test.
Settings in your consent plugin
- Complianz: run the Wizard, go to Consent, then Statistics, and tell it how Google is loaded ("Yes, with Google Analytics" or the Tag Manager option). Complianz explains the follow-up questions in its Consent Mode v2 guide. Some of them, such as whether to block all Google tags before consent, only appear in certain configurations; Complianz recommends answering "No" there, which means Google tags run in advanced mode. If the statistics options are missing, the guide points you to Integrations, Plugins, where an integration with Site Kit, GTM4WP or MonsterInsights may be active.
- CookieYes (WordPress plugin): the plugin has to be connected to the CookieYes web app. Then go to the CookieYes dashboard, Google Consent Mode (GCM), switch on "Enable Google Consent Mode (GCM)" and confirm, set the default consent states and regions, and click "Publish Changes" (CookieYes docs).
- Cookiebot (WordPress plugin): the plugin settings have a Google Consent Mode tab, switched on by default (Cookiebot: implementing Google Consent Mode). Make sure it is still enabled, and that the Cookiebot script loads before your Google tag.
If Google runs through Google Tag Manager
Use a consent template from the Community Template Gallery for your consent plugin, fire it on the Consent Initialization - All Pages trigger, and set consent requirements on your GA4 and Ads tags (Google: consent in Tag Manager). Our GTM Consent Mode v2 guide shows each step and five common mistakes.
Remove duplicates
Whatever you choose, keep one way of loading GA4 and one way of loading Google Ads. If Site Kit loads GA4, remove the GA4 tag from GTM and from your theme, and the other way round.
While you are there: shorten the GA4 cookie
GA4's _ga cookie lasts 2 years by default (Google Analytics Help). You can change it in GA4 under Admin, Data collection and modification, Data streams, your web stream, Configure tag settings, Show all, Override cookie settings. In our 97k study, 27% of sites set at least one cookie with a lifetime above 13 months, and _ga was the most common one.
How to verify the fix
Use a new private window for each run:
- Before any click: no
_gacookie. In Tag Assistant, the earliest Consent event shows On-page Default "Denied" forad_storage,analytics_storage,ad_user_dataandad_personalization. - Reject: still no
_gaafter a reload and after opening a product page. - Accept (new window): On-page Update shows "Granted",
_gaappears, and GA4's real-time report shows your visit. - Google Ads: check the Diagnostics tab of your conversion action for "Consent mode is implemented". Google says this can take 48 hours, and in some cases up to two weeks.
If the default only shows "Granted", your plugin is sending the wrong default. If the Consent tab is empty, Consent Mode is not running on that page at all.
Related reading: Meta Pixel fires before consent on WooCommerce and Pre-consent tracking explained.
Check your site in 1 minute
Our free scan loads your shop in a clean browser and reports whether Google tags run before consent, whether a Consent Mode default is present, and whether the state matches what the browser actually does. No signup needed. Run a free scan.
Get alerted when it breaks
Plugin updates, a new GTM container version or a theme change can quietly undo your setup. With monitoring, we re-scan your shop on a schedule and email you when Consent Mode or pre-consent tracking changes. Create an account and add your site.
Last updated: