Configuring Google Consent Mode v2 for privacy-compliant measurement and advertising. Covers default and update commands, consent state mapping to GA4 and Google Ads, conversion modeling with cookieless pings, and EEA requirements effective March 2024.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Um comando direto ignora o prompt de revisão. Verifique a origem antes de executá-lo.
Instruções da origem · Visualização somente leitura
name
google-consent-mode-v2
title
Configuring Google Consent Mode v2
description
Configuring Google Consent Mode v2 for privacy-compliant measurement and advertising. Covers default and update commands, consent state mapping to GA4 and Google Ads, conversion modeling with cookieless pings, and EEA requirements effective March 2024.
Google Consent Mode v2 is a framework that adjusts the behavior of Google tags (Analytics, Ads, Floodlight) based on user consent status. Announced in November 2023 with enforcement beginning March 2024, Consent Mode v2 introduces two new parameters — ad_user_data and ad_personalization — alongside the existing analytics_storage and ad_storage parameters. For advertisers serving users in the European Economic Area (EEA), implementing Consent Mode v2 is required to maintain measurement and audience capabilities in Google Ads and GA4. Without it, Google will not process EEA user data for remarketing lists or conversion measurement.
Consent Mode v2 Parameters
Parameter Definitions
Parameter
Controls
Default
Description
ad_storage
Advertising cookies
denied
Controls whether advertising-related cookies (gcl*, IDE) can be read/written
ad_user_data
User data for advertising
denied
Controls whether user data can be sent to Google for advertising purposes
ad_personalization
Ad personalization
denied
Controls whether data can be used for remarketing and personalized ads
analytics_storage
Analytics cookies
denied
Controls whether analytics cookies (_ga, _gid) can be read/written
functionality_storage
Functionality cookies
granted
Controls functionality cookies (language preferences)
personalization_storage
Personalization cookies
denied
Controls personalization cookies (recommendations)
security_storage
Security cookies
granted
Controls security-related cookies (authentication, fraud prevention)
Consent State Mapping for Pinnacle E-Commerce Ltd
Map CMP consent categories to Consent Mode parameters:
CMP Category
ad_storage
ad_user_data
ad_personalization
analytics_storage
All rejected (default)
denied
denied
denied
denied
Analytics only
denied
denied
denied
granted
Analytics + Advertising
granted
granted
granted
granted
Analytics + Advertising (no personalization)
granted
granted
denied
granted
All accepted
granted
granted
granted
granted
Implementation
Basic Implementation (Google Tag / gtag.js)
Step 1: Set defaults before any Google tags load
Place this script in the <head> before the Google tag:
<script>window.dataLayer = window.dataLayer || [];
functiongtag(){dataLayer.push(arguments);}
// Set default consent state — deny all non-essential before user interactiongtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'granted',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500// Wait 500ms for CMP to load
});
// Enable URL passthrough for conversion measurement without cookiesgtag('set', 'url_passthrough', true);
// Enable ads data redaction when ad_storage is deniedgtag('set', 'ads_data_redaction', true);
</script>