gtm-consent-mode-guide

gtm-consent-mode-guide is a skill for Claude Code from Ad-Superpowers/ad-superpowers-plugin. It costs 117 tokens per session (5,903 once invoked), scanned A, original, MIT.

A guide to implementing Google Consent Mode v2, a system that tells Google advertising and analytics tools whether a visitor has granted consent for specific data uses. It covers connection with a consent management platform, the software that collects those choices.

In plain words
What is it for?
Use it to configure consent defaults and updates, connect a consent platform, support the required consent signals, and handle Enhanced Conversions where consent allows it.
Why use it?
Websites must handle consent before using non-essential cookies and related advertising data, especially for users in the European Economic Area. Incorrect settings can prevent lawful measurement, remarketing, or modeled reporting.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ad-superpowers plugin — 120 skills, 35 commands, 5 agents, 1 MCP server shipped together

Good fit Use it to configure consent defaults and updates, connect a consent platform, support the required consent signals, and handle Enhanced Conversions where consent allows it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Ad-Superpowers/ad-superpowers-plugin --skill gtm-consent-mode-guide
Clone the repo
git clone --depth 1 https://github.com/Ad-Superpowers/ad-superpowers-plugin

Made for: Claude Code.

Or install ad-superpowers, the plugin that ships this one along with the rest of its 120 skills, 35 commands, 5 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gtm-consent-mode-guide

README.md
[![agentmods](https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide/github.svg)](https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide)
Your own site
<a href="https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide"><img src="https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gtm-consent-mode-guide

Your own site · 80×15
<a href="https://agentmods.dev/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide"><img src="https://agentmods.dev/badge/skills/ad-superpowers/ad-superpowers-plugin/gtm-consent-mode-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 117 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,903 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00117 $0.05903
Opus 5.5 $0.00047 $0.02361
Sonnet 5.5 $0.00023 $0.01181
Haiku 4.5 $0.00012 $0.00590

Measured 1mo ago against content hash 39d944795d58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gtm-consent-mode-guide scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugin/skills/gtm-consent-mode-guide/SKILL.md · 571 lines

How it starts

The opening of the file, as written. The whole thing — 571 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Since March 2024, Google requires Consent Mode v2 for any advertiser serving users in the European Economic Area (EEA). Without it, Google Ads, GA4, and other Google products cannot use remarketing or behavioral modeling for those users. This skill covers everything you need to implement consent correctly, integrate a CMP, and recover the data you lose to cookie consent refusals.

Regulatory Background

Regulation Scope Key Requirement
GDPR (2018) EU/EEA residents Explicit consent before storing cookies or processing personal data
ePrivacy Directive EU/EEA Consent before setting non-essential cookies
Digital Markets Act (2024) Large platforms (Google, Meta, etc.) Platforms must verify consent before using data for ads
TDDDG (Germany) Germany Stricter interpretation of ePrivacy
nFADP (Switzerland) Switzerland GDPR-equivalent since Sept 2023

What Changed in v2 (March 2024)

Consent Mode v1 had two consent types: ad_storage and analytics_storage. v2 adds two more:

Consent Type Purpose Required Since
ad_storage Cookies for advertising (Google Ads, remarketing) v1 (2020)
analytics_storage Cookies for analytics (GA4, GA) v1 (2020)
ad_user_data NEW in v2. Sending user data to Google for advertising March 2024
ad_personalization NEW in v2. Using data for ad personalization/remarketing March 2024

If you do not implement v2: Google Ads cannot use remarketing audiences, conversion modeling is disabled, and your campaigns lose optimization signal for EEA users.

The Two-Step Consent Flow

Step 1: consent_default (on page load, BEFORE any tags fire)
  |
  Set all consent types to 'denied' for EEA users
  |
  GTM loads tags in RESTRICTED mode:
  - GA4: sends cookieless pings (no user identification)
  - Google Ads: no conversion tracking, no remarketing
  - Meta: pixel does not fire
  |
Step 2: consent_update (when user interacts with consent banner)
  |
  +-- User ACCEPTS all --> Update all to 'granted'
  |   GTM reloads tags in FULL mode
  |   Cookies are set, full tracking resumes
  |
  +-- User ACCEPTS analytics only --> Update analytics_storage to 'granted'
  |   GA4 sets cookies, ads remain restricted
  |
  +-- User REJECTS all --> No update (stays 'denied')
      Cookieless pings continue, no cookies set

Read the full file on GitHub · 571 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 571 lines · 117 tokens per session scan A 39d944795d58

Subscribe to this mod's changes

gtm-consent-mode-guide is a skill published in the GitHub repository Ad-Superpowers/ad-superpowers-plugin (5 stars, last pushed 29d ago), licensed MIT. It adds 117 tokens to every session and 5,903 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.

Related

Other skills, from other repositories

ai-hive-administrative-review-materials

A document-preparation workflow for organising materials for an administrative appeal, which challenges a government decision or action through an official review process.

wubin1836/ai-hive-agent-skills · 121 tokens

ai-hive-after-death-official-checklist

A checklist assistant for handling administrative tasks after a family member dies, such as identifying procedures, organisations, accounts, and required documents. It works from authorised source materials and treats local official rules as the final authority.

wubin1836/ai-hive-agent-skills · 121 tokens

ai-gaochao-cn-migration-ai-hive

A migration-review workflow for moving AI API workloads between providers. It examines data retention, training use, data location, deletion, contracts and operational tests before any traffic is moved.

wubin1836/ai-hive-agent-skills · 166 tokens

sealeap-pixiu-amazon-account-compliance

An Amazon account-risk and compliance workflow covering brand registration, intellectual property, customer service, and support cases. It organizes notices, evidence, deadlines, affected accounts, and corrective materials without inventing missing facts.

xjli360/sealeap-amazon-ad-skills · 84 tokens

sealeap-amazon-compliance-led-growth

Build an Amazon growth strategy that treats tax, product safety, account, IP, and logistics compliance as non-negotiable constraints, then compares niches, price bands, operating models, and marketplaces using weighted economics. Use when the user asks how to find opportunities as compliance costs rise or whether to…

xjli360/sealeap-amazon-ad-skills · 83 tokens

sealeap-amazon-negative-review-response

Triage negative Amazon reviews into policy violations, suspected abuse, and genuine product feedback, then prepare factual official reports and product-remediation actions. Use when the user asks whether a review can be removed, how to report abusive content, or how to respond to a rating decline. Never fabricate…

xjli360/sealeap-amazon-ad-skills · 79 tokens