ga4-privacy-compliance
Expert guidance for GA4 privacy and compliance including GDPR, CCPA, Consent Mode v2, data deletion, and privacy settings. Use when implementing Consent Mode…

Установить ga4-privacy-compliance в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
GA4 Privacy and Compliance
Overview
GA4 provides privacy-focused features for GDPR, CCPA, and global privacy regulations including Consent Mode, data controls, and compliance workflows.
When to Use This Skill
Invoke this skill when:
- Implementing Consent Mode v2 for GDPR compliance
- Setting up consent banners and consent management platforms (CMPs)
- Configuring privacy settings for EU/EEA users
- Handling GDPR/CCPA data deletion requests
- Implementing privacy-first tracking strategies
- Setting consent parameters (ad_storage, analytics_storage)
- Configuring data retention policies
- Managing user opt-outs and privacy requests
- Working with consent management platforms (OneTrust, Cookiebot)
- Implementing server-side consent tracking
- Debugging consent mode implementation
- Ensuring regulatory compliance for analytics
Core Capabilities
Consent Mode v2
What is Consent Mode: Google's API for communicating user consent status to GA4, Google Ads, and other Google tags.
Consent Parameters (v2):
ad_storage
- Purpose: Advertising cookies (remarketing, conversion tracking)
- Values: "granted" | "denied"
analytics_storage
- Purpose: Analytics cookies (GA4 tracking)
- Values: "granted" | "denied"
ad_user_data (NEW in v2)
- Purpose: User data sharing for advertising
- Values: "granted" | "denied"
ad_personalization (NEW in v2)
- Purpose: Personalized advertising
- Values: "granted" | "denied"
Additional Parameters:
personalization_storage
- Purpose: Website personalization
- Values: "granted" | "denied"
functionality_storage
- Purpose: Essential site functionality
- Values: "granted" | "denied"
security_storage
- Purpose: Security features (fraud prevention)
- Values: "granted" | "denied"
Implementing Consent Mode
Basic Implementation (gtag.js):
Step 1: Set Default Consent State (BEFORE gtag.js)
<script>
// Set default consent to denied
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
// Configure GA4
gtag('config', 'G-XXXXXXXXXX');
</script>
<!-- Load gtag.js -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
Step 2: Update Consent After User Choice
// When user accepts all cookies
gtag('consent', 'update', {
'ad_storage': 'granted',
'ad_user_data': 'granted',
'ad_personalization': 'granted',
'analytics_storage': 'granted'
});
// When user accepts only analytics
gtag('consent', 'update', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'granted'
});
// When user denies all
gtag('consent', 'update', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
GTM Implementation:
Method 1: Using Consent Mode Template
- Install CMP Template (OneTrust, Cookiebot, etc.)
- Configure default consent in template
- Template auto-updates consent on user choice
Method 2: Manual GTM Setup
Create Consent Initialization Tag:
- Tag Type: Custom HTML
- Code:
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied'
});
</script>
- Trigger: Consent Initialization - All Pages
- Tag firing priority: 999 (fires first)
Create Consent Update Tag (on user acceptance):
- Tag Type: Custom HTML
- Code:
gtag('consent', 'update', ...) - Trigger: Custom event from CMP (e.g.,
consent_granted)
Regional Settings
EU-Specific Consent:
gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied'
}, {
'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB']
});
gtag('consent', 'default', {
'ad_storage': 'granted',
'analytics_storage': 'granted'
}, {
'region': ['US-CA'] // California - CCPA
});
Consent Mode Behavior
When analytics_storage = "denied":
- GA4 uses cookieless pings
- No client_id stored in cookies
- Modeling used to fill gaps
- Limited user tracking
- Session duration not tracked
When analytics_storage = "granted":
- Full GA4 tracking enabled
- Cookies stored
- client_id persists
- Complete user journey tracking
Conversion Modeling: When consent denied, GA4 uses:
- Machine learning to estimate conversions
- Aggregated, anonymized data
- Behavioral modeling
- "Modeled" label in reports
Data Retention Se
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- metadata.json
FAQ
Что делает скилл ga4-privacy-compliance?
Expert guidance for GA4 privacy and compliance including GDPR, CCPA, Consent Mode v2, data deletion, and privacy settings. Use when implementing Consent Mode, ensuring GDPR compliance, handling data deletion requests, configuring consent banners, or implementing privacy-first tracking. Covers consent parameters (ad_user_data, ad_personalization), data retention, IP anonymization, and compliance workflows.
Как установить скилл ga4-privacy-compliance?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ga4-privacy-compliance запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
