consent-management

consent-management is a skill for Cursor from kws-projects/react-boilerplate. It costs 0 tokens per session (1,317 once invoked), scanned A, original, MIT.

A guide for changing Google Analytics 4 consent handling, including the setting that controls whether analytics and advertising storage start allowed or denied. It also covers connecting a consent-management platform, which collects visitors' choices.

In plain words
What is it for?
Use it when launching a site in a consent-required market, adding a consent-management platform, or changing the site's default tracking permission. It also helps update the analytics setup to reflect an organisation's privacy policy.
Why use it?
It helps adapt analytics tracking to privacy requirements in places such as the European Union, the United Kingdom, or Brazil. It makes the required change from automatic permission to prior user choice explicit.

Skill for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when launching a site in a consent-required market, adding a consent-management platform, or changing the site's default tracking permission. It also helps update the analytics setup to reflect an organisation's privacy policy.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kws-projects/react-boilerplate/consent-management
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 kws-projects/react-boilerplate --skill consent-management
Clone the repo
git clone --depth 1 https://github.com/kws-projects/react-boilerplate

Made for: Cursor.

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 consent-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/consent-management/github.svg)](https://agentmods.dev/skills/kws-projects/react-boilerplate/consent-management)
Your own site
<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/consent-management"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/consent-management/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 consent-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/kws-projects/react-boilerplate/consent-management"><img src="https://agentmods.dev/badge/skills/kws-projects/react-boilerplate/consent-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,317 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.00000 $0.01317
Opus 5.5 $0.00000 $0.00527
Sonnet 5.5 $0.00000 $0.00263
Haiku 4.5 $0.00000 $0.00132

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

Security

Grade A, and why

consent-management 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 3mo 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.

.cursor/skills/consent-management/SKILL.md · 173 lines

How it starts

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

Integrate or modify consent handling for GA4 Consent Mode v2. Use when launching in a consent-required market (EU/EEA, UK, Brazil LGPD, etc.), integrating a Consent Management Platform (CMP), or modifying the default consent posture.

Current state

Consent defaults to granted in src/lib/analytics.ts. No CMP is integrated. This is appropriate when the target market has no legal requirement for prior user consent before analytics tracking.

When to change

You must switch to a consent-denied default when any of these apply:

  • Launching in the EU/EEA or UK (GDPR / ePrivacy Directive)
  • Launching in Brazil (LGPD)
  • Launching in a jurisdiction with similar consent-before-tracking laws
  • Your organisation's privacy policy requires opt-in consent regardless of market

Step 1: Change the default consent posture

In src/lib/analytics.ts, inside init(), replace the granted defaults:

// Before (current — consent granted by default)
gtag('consent', 'default', {
  analytics_storage: 'granted',
  ad_storage: 'granted',
  ad_user_data: 'granted',
  ad_personalization: 'granted',
})

// After (consent denied until user grants)
gtag('consent', 'default', {
  analytics_storage: 'denied',
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  wait_for_update: 500, // ms to wait for CMP to load
})

Step 2: Integrate a CMP

Choose one of the following approaches:

Option A: Third-party CMP (recommended for production)

Popular CMPs with Google Consent Mode v2 support:

  • Cookiebot — automatic geo-detection, plug-and-play script tag
  • OneTrust — enterprise-grade, geo-specific banner rules
  • Usercentrics — strong EU compliance, Google CMP partner
  • Cookie Information — simple setup, Google-certified

These CMPs automatically call gtag('consent', 'update', {...}) when the user interacts with the banner. No custom code needed beyond loading their script.

Read the full file on GitHub · 173 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. 3mo ago First seen · 173 lines · 0 tokens per session scan A 27e0bdcadc9e

Subscribe to this mod's changes

consent-management is a skill published in the GitHub repository kws-projects/react-boilerplate (3 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,317 tokens. 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-08-31.

Related

consent-management compared with skills from other repositories

consent-management next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
consent-managementkws-projects/react-boilerplateSkill35mo agoMITA0Cursor
anvil-adsense-auditPNGTRID/AnvilWikiSkill239todayMITA136Claude Code, Codex
thai-government-formBoom-Vitt/claude-thai-skillsSkill681mo agoMITA0Claude Code
full-after-careellmos-ai/skillsSkill10yesterdayMITA196Claude Code, Codex
thai-pdpaBoom-Vitt/claude-thai-skillsSkill681mo agoMITA0Claude Code
thai-invoiceBoom-Vitt/claude-thai-skillsSkill681mo agoMITA0Claude Code
Risk Factor Reviewzgbrenner/agentcounselSkill213mo agoMITA67Claude Code, Codex