followed by the standard gtag initialization snippet."},{"@type":"HowToStep","position":3,"text":"After your CMP banner runs and the user makes a choice, call gtag('consent', 'update', {ad_storage: userGrantedAds ? 'granted' : 'denied', analytics_storage: userGrantedAnalytics ? 'granted' : 'denied', ad_user_data: userGrantedAds ? 'granted' : 'denied', ad_personalization: userGrantedAds ? 'granted' : 'denied'})."},{"@type":"HowToStep","position":4,"text":"Enable URL passthrough for cross-site measurement by adding url_passthrough: true to the default consent call if you run cross-domain tracking."},{"@type":"HowToStep","position":5,"text":"Verify implementation using the Google Tag Assistant browser extension: check that consent state transitions from 'denied' to 'granted' after user interaction, and that conversion modeling is active in Google Ads for denied-state traffic."},{"@type":"HowToStep","position":6,"text":"For server-side GTM implementations, forward the consent state as an event parameter in the client container and read it in your server container's consent initialization tag."}],"about":"developers.google.com/tag-platform","dateCreated":"2026-06-12T16:34:11.151Z"}
Implement Google Consent Mode v2 with gtag.js default and update commands for an EEA-targeted site
In the <head>, before loading gtag.js, add a <script> tag that calls gtag('consent', 'default', {ad_storage: 'denied', analytics_storage: 'denied', ad_user_data: 'denied', ad_personalization: 'denied', wait_for_update: 500, region: ['AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GR','HR','HU','IE','IT','LT','LU','LV','MT','NL','PL','PT','RO','SE','SI','SK','IS','LI','NO','CH']}) to default-deny for EEA/UK.
Load the Google Tag via <script async src='https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX'></script> followed by the standard gtag initialization snippet.
After your CMP banner runs and the user makes a choice, call gtag('consent', 'update', {ad_storage: userGrantedAds ? 'granted' : 'denied', analytics_storage: userGrantedAnalytics ? 'granted' : 'denied', ad_user_data: userGrantedAds ? 'granted' : 'denied', ad_personalization: userGrantedAds ? 'granted' : 'denied'}).
Enable URL passthrough for cross-site measurement by adding url_passthrough: true to the default consent call if you run cross-domain tracking.
Verify implementation using the Google Tag Assistant browser extension: check that consent state transitions from 'denied' to 'granted' after user interaction, and that conversion modeling is active in Google Ads for denied-state traffic.
For server-side GTM implementations, forward the consent state as an event parameter in the client container and read it in your server container's consent initialization tag.
Known gotchas
Omitting the region parameter causes all global visitors — not just EEA — to receive the denied default; most advertisers only need this for EEA/UK traffic.
The wait_for_update value (in milliseconds) gives your CMP time to update consent before the Google tag fires; too low a value causes the tag to fire in denied state even when the user has previously consented.
Since March 2024, Google requires Consent Mode v2 for EEA advertising features; campaigns targeting EEA users lose audience building and conversion modeling for users who have not consented if the update command never fires.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp