Ready-to-use GTM setup for Google Consent Mode v2 — sets denied defaults and updates consent state from any CMP signal.
by Jacob Ospina · updated May 19, 2026
8 components, ready to install into any GTM workspace
3 tags
Tags included in this recipe
1 trigger
Custom event triggers
4 variables
Data layer variables
1 quick check before publish
consent state for ad_storage, analytics_storage, ad_user_data, ad_personalization
Implements Google Consent Mode v2 in GTM with a three-tag approach. A consent initialisation tag fires on all pages and sets all ad/analytics categories to denied by default. A second tag listens for a consent_updated custom event from your CMP and calls gtag('consent', 'update', …) with the user's actual choices. A GA4 configuration tag loads after consent initialisation. Variables read consent state directly from window.dataLayer, making the setup compatible with any CMP that pushes a consent_updated event — including iubenda Cookie Solution.