Skip to content
WSWS ThemesDocs
Mandatory5 min readUpdated August 2026

Google Consent Mode v2 Setup

Step-by-step instructions to synchronize ad_storage, analytics_storage, ad_user_data, and ad_personalization signals with Google tags.

Google Consent Mode v2 is mandatory for merchants running Google Ads, GA4, and remarketing in the European Economic Area (EEA) and the UK. WS Cookie Consent integrates directly with gtag.js and Google Tag Manager (GTM) with zero custom JavaScript required.

2024+ Compliance Requirement

Without Consent Mode v2 active, Google Ads conversion tracking and remarketing audiences for EEA/UK traffic are permanently degraded by Google.

Consent Mode v2 introduces two new consent signals in addition to analytics and advertising storage: ad_user_data and ad_personalization. WS Cookie Consent automatically maps customer preferences to these signals.

Google SignalWS Cookie CategoryDefault (EEA)Post-Consent
analytics_storageAnalytics Cookiesdeniedgranted if opted in
ad_storageMarketing Cookiesdeniedgranted if opted in
ad_user_dataMarketing Cookiesdeniedgranted if opted in
ad_personalizationMarketing Cookiesdeniedgranted if opted in
functionality_storageFunctional Cookiesgrantedgranted
security_storageNecessary Cookiesgrantedgranted

Configuring with Google Tag Manager#

When Google Consent Mode v2 is enabled in WS Cookie Consent settings, default states are pushed to dataLayer before any tags execute:

javascript
// Initialized automatically at the top of <head>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}

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

Testing with Tag Assistant#

Open tagassistant.google.com, connect your store URL, and click Accept All on your banner. In Tag Assistant's Consent tab, you will observe the state transitions from denied to granted.

Have feedback or question about this guide?

Our commerce engineering studio provides direct developer assistance.