Implementera Google Consent Mode V2 steg för steg — Den ultimata handledningen

What Is Google Consent Mode V2

Consent Mode V2 is a Google API that adjusts how Google tags behave based on consent status. Instead of all-or-nothing, tags can load in a restricted, cookieless state when consent is not granted, then switch to full tracking once the user consents. Google made it mandatory for EEA advertisers in March 2024.

Without it: conversion modelling stops, remarketing audiences shrink, and Smart Bidding degrades.

The Four Consent Parameters

The two new V2 parameters — ad_user_data and ad_personalization — are what distinguish V2 from V1. If you only have ad_storage and analytics_storage, you must add the new parameters.

Basic vs Advanced Mode

Basic: Tags do not load until consent is granted. Simple but you lose all data from declining users.

Advanced: Tags load immediately in restricted mode, sending cookieless pings with no personal data. Google uses these for conversion modelling, recovering up to 70% of lost conversions. Always use Advanced mode.

Step 1: Set Default Consent State

Place this before any Google tags in your <head>:

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

The wait_for_update parameter gives your CMP 500ms to restore a returning visitor’s consent before tags proceed in denied mode.

Step 2: Update Consent on User Choice

When the user clicks Accept:

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

For partial consent (analytics only, no ads), update only the granted parameters.

Step 3: GTM Implementation

Enable Consent Overview in GTM (Admin > Container Settings). Create a Consent Initialization tag with the default snippet. Configure each tag’s Consent Settings to require the relevant parameters. Most CMPs push a dataLayer event on consent change — create a trigger for it.

Step 4: Verify Your Implementation

Conversion Modelling

In Advanced mode, cookieless pings from non-consenting users feed Google’s conversion models. Requirements: 1,000+ ad-click events/day for 7 days with consent granted. When active, modelling recovers 50-70% of lost conversions.

Common Mistakes

Skip the Complexity with FlexyConsent

FlexyConsent handles all of this automatically: default denied state, update commands, all four parameters, TCF 2.3, Microsoft UET Consent Mode, returning visitor consent restoration — all from a single script tag. Plans from EUR 0/month.

← Blogg Läs allt →