Přeskočit na obsah
ADVANCED SETUP

Consent Mode V2

How to implement Google Consent Mode V2 with server-side GTM for GDPR compliance.

10 min čtení Pokročilý Aktualizováno 5.6.2026

⏱️ Setup time: about 20 minutes | Level: Advanced

What is Consent Mode V2?

Google Consent Mode V2 (mandatory since March 2024 in the EEA) lets you adapt the behavior of Google tags based on user consent. Two new signals:

  • ad_user_data — consent to sharing user data with Google for advertising
  • ad_personalization — consent to personalized advertising/remarketing

How it works with sGTM

The consent state propagates from the site through sGTM to the end platforms:

  1. 1. The cookie banner sets the consent state (a CMP tool — Cookiebot, CookieYes, etc.)
  2. 2. The GTM web container passes the consent data into sGTM
  3. 3. sGTM respects the consent and sends / doesn't send data according to it
  4. 4. Google platforms (GA4, Ads) accept pings even without consent — but they model the data

Setup

  1. CMP: Install a consent management platform (Cookiebot, CookieYes) with Consent Mode V2 support
  2. Web GTM: Activate gtag('consent', 'default', { ... }) with a default state of 'denied'
  3. Web GTM: The CMP template tag updates the consent after the user interacts
  4. sGTM: Consent signals are passed automatically in the GA4 requests — no special server-side setup needed

Verification

  • In GTM Preview you see the consent state (Consent tab)
  • GA4 shows "Consent mode active" in real-time
  • Google Ads → Conversions → Diagnostics — consent signals detected
Pomohl vám tento článek?
✓ Děkujeme za zpětnou vazbu