Google Consent Mode v2 on WooCommerce: Setup Guide

By 8 min read

Consent Mode v2: the default command denies, the banner collects the choice, the update command grants and GA4 and Google Ads follow.

Google Consent Mode v2 tells Google tags whether a visitor accepted cookies, so Google Analytics 4 and Google Ads change what they collect. On a WooCommerce store the setup itself is small: one default command, one update command, and a cookie banner that sends the update. Most stores get it wrong on order, not on code.

This guide covers what the two commands do, how basic and advanced mode differ, what you lose in the European Economic Area without it, and how to check your setup in Tag Assistant before you trust your reports.

Key takeaways

  • The default command must run on every page before any Google tag, including GTM.
  • Consent Mode v2 adds two signals, ad_user_data and ad_personalization, on top of ad_storage and analytics_storage.
  • Basic mode blocks tags until the visitor chooses. Advanced mode loads tags and sends cookieless pings when consent is denied.
  • Without the v2 signals, EEA traffic cannot feed remarketing or personalized ads.
  • Tag Assistant’s Consent tab shows the default and the update state for every tag.

How do the default and update commands work?

The default command sets the consent state before the visitor makes a choice, and it must run on every page before any measurement command. The update command sends the visitor’s choice once they click accept or reject. Consent mode does not save choices, so your banner has to store them and resend them on each page.

The default command

A typical default for a store selling into Europe denies everything until the visitor answers:

gtag('consent', 'default', { 'ad_storage': 'denied', 'analytics_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'wait_for_update': 500 });

The wait_for_update value gives an asynchronous banner time to send its update before tags fire. Google’s example uses 500 milliseconds. You can also add a region parameter with ISO 3166-2 codes, so visitors from the EEA start as denied while visitors from other countries start as granted. When regions overlap, the more specific one wins.

The update command

When the visitor accepts, the banner calls:

gtag('consent', 'update', { 'ad_storage': 'granted', 'analytics_storage': 'granted', 'ad_user_data': 'granted', 'ad_personalization': 'granted' });

On the next page view, the banner reads its own cookie and sends the same update right after the default. If it forgets, every page after the first one looks like a denied visit.

Where the order breaks on WooCommerce

On WooCommerce stores we maintain, the usual problem is order. A theme or plugin prints GTM or gtag high in the <head>, and the consent tool loads later in the footer or after a delay script. The tags fire first and the default arrives too late. Check these points:

  • The default runs inline in the <head>, before GTM, gtag.js and any analytics plugin.
  • JavaScript delay or “load on interaction” features in your optimization plugin exclude the consent script.
  • In GTM, the consent default uses the Consent Initialization trigger, not All Pages.
  • The order received page, where the purchase event fires, loads the same consent script as the rest of the site.
  • Only one tool sets the default. Two banners, or a banner plus a tracking plugin that also sets defaults, give conflicting states.

Common mistakes we see on WooCommerce stores

  • Banner says v2, sends v1. Only ad_storage and analytics_storage appear in Tag Assistant.
  • Granted by default everywhere. The region setting was never configured, so EEA visitors start as granted.
  • Delay scripts. A speed plugin delays the consent script until the first scroll, so the default arrives late.
  • Two sources of truth. A tracking plugin sets its own default after the banner sets another one.
  • Hardcoded tags in the theme. An old gtag snippet in header.php runs before everything else.

If you are not sure where your store stands, our free store audit includes a consent and tracking check.

Frequently asked questions

Is Google Consent Mode v2 a cookie banner?

No. Consent Mode only passes the visitor’s choice to Google tags. You still need a consent tool that shows the banner, stores the choice and sends the default and update commands.

Do I need Consent Mode v2 if I do not run Google Ads?

If you only use GA4, the analytics signal still matters, because it controls whether GA4 can set cookies. The two v2 signals matter most for Google Ads conversions, enhanced conversions and remarketing.

Should I choose basic or advanced mode?

Basic mode sends nothing until consent, which is simpler to defend. Advanced mode sends cookieless pings and gives better modeling. Ask your privacy adviser, then configure your consent tool to match.

Why does Tag Assistant show an empty Consent tab?

An empty Consent tab means consent mode is not implemented on that page, or the consent script did not run before the tag. Check that the default loads in the head and is not delayed.

Does page caching break Consent Mode on WooCommerce?

Usually not, because the choice is read from a cookie in the browser. It breaks when cached HTML still contains an old script order, so purge the page cache after every consent change.