Agent skill

Analytics Cookie Consent

by mukul975 in mukul975/Privacy-Data-Protection-Skills

Managing consent for analytics cookies and implementing privacy-preserving measurement.

Apache-2.0Auto-check passedLegal & Compliance

Install Analytics Cookie Consent

skills CLI
$ npx skills add mukul975/Privacy-Data-Protection-Skills --skill analytics-cookie-consent -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mukul975/Privacy-Data-Protection-Skills analytics-cookie-consent --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/privacy/analytics-cookie-consent .claude/skills/analytics-cookie-consent && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
analytics-cookie-consent
GitHub stars
297
Token cost
~2.7k tokens
SKILL.md length
1,194 words
Files
5 (incl. scripts, references, assets)
Skills in repo
280
Repo updated
First seen
Licence
Apache-2.0

At a glance

Managing consent for analytics cookies and implementing privacy-preserving measurement.

  • Works in 4 steps: Data is processed by Google (a third… → Data may be combined with other Google… → Data is transferred to the United States → …
  • Tasks that involve Privacy and GDPR
  • SKILL.md covers Overview, GA4 Privacy Configuration, Analytics Without Consent —… and Aggregate Reporting Alternatives, plus 2 more sections
  • Runs Python scripts from its folder

What it does

Analytics Cookie Consent is an agent skill from mukul975/Privacy-Data-Protection-Skills. Managing consent for analytics cookies and implementing privacy-preserving measurement. Covers GA4 privacy configuration, consent mode fallback behavior, aggregate reporting alternatives, and cookieless measurement approaches.

Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts, reference files and assets (for example `assets/template.md`, `references/standards.md` and `references/workflows.md`).

It sits in Legal & Compliance, covering Privacy and GDPR. It works with Google Analytics. The repository describes itself as: 282+ structured privacy & data protection skills for AI agents. GDPR, CCPA, EU AI Act, HIPAA, LGPD, PIPL, DPDP Act. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Privacy and GDPR

Example prompts

  • “/analytics-cookie-consent”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Data is processed by Google (a third party)
  2. Data may be combined with other Google services
  3. Data is transferred to the United States
  4. Google retains control over processing purposes

What it can do on your machine

Read from SKILL.md and the folder at commit 9b2ef9e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Analytics Cookie Consent loads about 2.7k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 1,194 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from mukul975/Privacy-Data-Protection-Skills at commit 9b2ef9e, republished under its Apache-2.0 licence (© mukul975). 1,194 words, ~2,682 tokens.

Download SKILL.mdSave it as .claude/skills/analytics-cookie-consent/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
analytics-cookie-consent
description
Managing consent for analytics cookies and implementing privacy-preserving measurement. Covers GA4 privacy configuration, consent mode fallback behavior, aggregate reporting alternatives, and cookieless measurement approaches.
license
Apache-2.0
metadata.author
mukul975
metadata.version
1.0
metadata.domain
privacy
metadata.subdomain
cookie-consent-compliance
metadata.tags
analytics-consent, ga4-privacy, cookieless-analytics, aggregate-reporting, privacy-measurement

Overview

Analytics cookies present a unique compliance challenge: they are among the most widely deployed non-essential cookies, yet many organizations depend on them for business intelligence. The ePrivacy Directive Article 5(3) requires consent for analytics cookies (they are not strictly necessary for the service requested by the user), confirmed by the Planet49 ruling. However, some Data Protection Authorities — notably the CNIL — have explored whether analytics can qualify for a consent exemption if configured with sufficient privacy safeguards. This skill covers compliant analytics implementation, consent mode fallback behavior, and alternatives that reduce or eliminate the need for consent.

GA4 Privacy Configuration

Privacy-First GA4 Setup for Pinnacle E-Commerce Ltd

Configure GA4 with maximum privacy protections:

GA4 Property Settings:

SettingValuePurpose
Data retention2 monthsMinimum needed for trend analysis
Reset user data on new activityEnabledDo not extend retention on revisit
IP anonymizationEnabled (default in GA4)Last octet removed before storage
Google SignalsDisabledPrevents cross-device tracking via Google account
Granular locationDisabledCity-level only, no GPS/precise location
Device data collectionDisabledReduces device fingerprinting surface
Data sharing with GoogleDisabledPrevents data use for Google benchmarking/products
Ads personalizationDisabledNo remarketing audiences from analytics
User ID featureDisabled unless explicit consentRequires separate consent if linking sessions

GA4 Data Stream Settings:

SettingValue
Enhanced measurementSelective — enable page views, scrolls; disable site search, file downloads unless needed
Cross-domain trackingOnly between pinnacle-ecommerce.com subdomains
Referral exclusionsAdd payment processors (stripe.com, paypal.com)
Internal traffic filteringExclude office IP ranges

GA4 behavior changes based on analytics_storage consent state:

When analytics_storage = granted:

  • _ga cookie set (client ID persisted)
  • _gid cookie set (session distinction)
  • Full event data collected
  • User-level and session-level reporting available
  • Real-time reports populated

When analytics_storage = denied:

  • No analytics cookies set
  • Cookieless pings sent to Google (if Consent Mode enabled)
  • Pings include: timestamp, page path, user agent, referrer, consent state
  • Pings do NOT include: client ID, session ID, user ID
  • GA4 uses behavioral modeling to estimate metrics from these pings
  • Modeled data appears in reports with a "modeled" badge
Behavioral Modeling Thresholds

For GA4 to provide modeled data for non-consenting users:

RequirementMinimum
Consented daily users1,000+ per web data stream
Consecutive days of data7+ days
Consent Mode implementationOn all GA4 tags
Data quality< 10% bot traffic

If thresholds are not met, GA4 reports will show only consented users — creating an undercount.

The CNIL published guidance (September 2020, updated June 2021) identifying limited conditions under which audience measurement cookies may be exempt from consent under ePrivacy Article 5(3). This is an interpretation specific to French law (transposition of ePrivacy Directive) and is not universally accepted across all EU member states.

CNIL Exemption Conditions:

ConditionRequirement
Purpose limitationStrictly limited to anonymous audience measurement on behalf of the publisher only
No cross-site trackingData must not be combined across different websites or apps
No data sharingData must not be shared with third parties
Cookie lifetimeMaximum 13 months
Data retentionMaximum 25 months from collection
IP addressAnonymized or not collected
User notificationUsers must still be informed about the cookies (even without consent)
Opt-out mechanismUsers must be able to object to the measurement

CNIL-Exempt Analytics Tools:

The CNIL maintains a list of analytics solutions that can be configured to meet exemption criteria:

ToolCNIL Exempt ConfigurationNotes
Matomo (self-hosted)Yes — with specific configNo data sharing, anonymized IP, 13-month cookie, self-hosted
AT Internet (Piano Analytics)Yes — exempt modeFrench analytics provider, certified by CNIL
Eulerian AnalyticsYes — exempt modeFirst-party data processing, no cross-site
Abla AnalyticsYes — privacy-by-designDesigned for CNIL exemption
Google Analytics 4No — does not meet exemptionData transferred to Google; cross-site processing

GA4 Cannot Qualify for CNIL Exemption Because:

  1. Data is processed by Google (a third party)
  2. Data may be combined with other Google services
  3. Data is transferred to the United States
  4. Google retains control over processing purposes
Show full SKILL.md (525 more words)Show less
Implementing Matomo as CNIL-Exempt Alternative

For Pinnacle E-Commerce Ltd, deploy Matomo alongside GA4:

Matomo CNIL-Exempt Configuration:

SettingValue
HostingSelf-hosted on EU servers (pinnacle-ecommerce.com infrastructure)
Cookie lifetime13 months maximum
IP anonymizationFull anonymization (2 bytes masked for IPv4)
Do Not TrackRespected
Data retentionVisitor logs: 25 months; aggregated reports: indefinite
Cross-site trackingDisabled
Third-party data sharingNone
User opt-outJavaScript opt-out widget on cookie policy page
Session fingerprintingDisabled — use cookie-based session only

Dual Analytics Architecture:

Page Load
    │
    ├── Always fire (no consent needed):
    │   └── Matomo (CNIL-exempt configuration)
    │       └── Basic pageview, session, referrer data
    │
    └── Fire only with analytics consent:
        └── GA4 (full measurement)
            └── Enhanced measurement, events, conversions

This gives Pinnacle E-Commerce Ltd baseline analytics for all users (via Matomo) and richer data for consenting users (via GA4).

Aggregate Reporting Alternatives

Privacy-Preserving Measurement Approaches
ApproachConsent RequiredData GranularityImplementation
Server-side log analysisNo (essential for operations)AggregateParse access logs for page views, status codes
Matomo (CNIL-exempt config)No (France only)Per-sessionSelf-hosted, privacy-configured
GA4 with Consent ModeYes (consent improves data)User-level (modeled for non-consenting)Standard implementation
Plausible AnalyticsDepends on jurisdictionAggregateNo cookies, no PII, EU-hosted
Fathom AnalyticsDepends on jurisdictionAggregateNo cookies, no PII
Privacy Sandbox Attribution ReportingEvolvingAggregateChrome-only, limited availability
Server-Side Log Analytics

The most privacy-preserving approach uses existing server access logs:

Available Metrics from Access Logs:

MetricSourceProcessing
Page viewsHTTP request countCount 200-status HTML requests
Unique visitors (daily)IP + User Agent hashHash and count distinct per day
Top pagesRequest URIRank by request count
ReferrersReferer headerParse and categorize
Device typesUser-Agent headerParse UA for device category
Geographic distributionIP geolocationResolve to country, discard IP
Error ratesHTTP status codesCount 4xx, 5xx responses
Page load performanceServer response timeMeasure TTFB from logs

Limitations:

  • No client-side event tracking (clicks, scrolls, form interactions)
  • No session stitching across pages (without cookies)
  • No conversion attribution
  • Bot traffic must be filtered (estimated 30-50% of web traffic)

Typical analytics consent rates observed across industries:

Consent Banner DesignAnalytics Consent RateImpact on GA4 Data
Accept All prominent, Reject buried80-90%Low data loss
Equal prominence (CNIL-compliant)40-60%Significant data loss
Reject All as default action20-35%Severe data loss
Cookie wall (non-compliant)90%+Artificially high — non-compliant

Pinnacle E-Commerce Ltd Expected Impact: With a CNIL-compliant equal-prominence banner, expect approximately 45-55% analytics consent rate. This means:

  • GA4 direct measurement covers ~50% of users
  • Consent Mode behavioral modeling recovers ~20-30% of lost data
  • Combined coverage: ~70-80% of actual traffic
  • Matomo (CNIL-exempt) provides 100% coverage for basic metrics
  • ePrivacy Directive 2002/58/EC, Article 5(3) — Consent required for analytics cookies (not strictly necessary)
  • CJEU Case C-673/17 (Planet49) — Active consent for all non-essential cookies including analytics
  • CNIL Deliberation No. 2020-091 (17 September 2020) — Cookie guidelines including audience measurement exemption
  • CNIL Guidelines on Audience Measurement Exemption (June 2021) — Conditions for consent-exempt analytics
  • EDPB Guidelines 05/2020 on Consent — Analytics cookies require consent under GDPR
  • Google Analytics 4 Privacy Documentation — GA4 data controls, consent mode, data retention
  • Matomo GDPR/CNIL Compliance Guide — Self-hosted configuration for consent exemption
  • Austrian DPA Decision (December 2021, DSB D155.027) — Found Google Analytics non-compliant with GDPR due to US data transfers
  • CNIL Decision on Google Analytics (February 2022) — Ordered website to comply or cease using GA; US transfer concern

© mukul975, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references, assets) in skills/privacy/analytics-cookie-consent of mukul975/Privacy-Data-Protection-Skills.

  • SKILL.md
  • assets/template.md
  • references/standards.md
  • references/workflows.md
  • scripts/process.py

Open the folder on GitHubat commit 9b2ef9e

Compare with similar skills

Analytics Cookie Consent next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Analytics Cookie Consent compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Analytics Cookie Consent this skillmukul975/Privacy-Data-Protection-Skills297—~2.7kAutomated safety check: PassApache-2.0
C15tc15t/c15t1.9k1 repos~1.6kAutomated safety check: PassApache-2.0
SEO Analiticaricneves-ai/flowgrammers-skills115—~2.3kAutomated safety check: PassMIT
Ga4 Privacy ComplianceMicrock/ordinary-claude-skills404—~3.1kAutomated safety check: PassCustom licence
Analyticsericrisco/rsc-harness174—~2.8kAutomated safety check: PassMIT
HIPAA Safe Harbor Coverage Auditmaziyarpanahi/openmed5.5k—~1.7kAutomated safety check: PassApache-2.0

Similar skills

  • C15t

    c15t/c15t

    Work with c15t consent management docs, APIs, and integrations for Next.js, React, and JavaScript.

    1.9k GitHub starsUsed in 1 repo~1.6k tokens
    Legal & ComplianceAuto-check passed
  • SEO Analitica

    ricneves-ai/flowgrammers-skills

    Skills para otimização de SEO técnico, análise de dados, criação de dashboards e inteligência de negócio para empresas brasileiras.

    115 GitHub stars~2.3k tokensUpdated 13 days ago
    Legal & ComplianceAuto-check passed
  • Ga4 Privacy Compliance

    Microck/ordinary-claude-skills

    Expert guidance for GA4 privacy and compliance including GDPR, CCPA, Consent Mode v2, data deletion, and privacy settings.

    404 GitHub stars~3.1k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed
  • Analytics

    ericrisco/rsc-harness

    A skill your agent uses when instrumenting product or web analytics — GA4/PostHog SDK wiring, event taxonomy, funnels, double-counted events, consent gating, PII scrubbing.

    174 GitHub stars~2.8k tokensUpdated yesterday
    Marketing & SEOAuto-check passed
  • Checks OpenMed de-identified clinical text against the 18 HIPAA Safe Harbor identifier categories and reports gaps and residual re-identification risk.

    5.5k GitHub stars~1.7k tokensUpdated today
    Legal & ComplianceAuto-check passed
  • Korean Privacy Terms

    kimlawtech/korean-privacy-terms

    처리방침·이용약관 자동 생성 스킬 패키지 (v4.0). An agent skill from kimlawtech/korean-privacy-terms.

    586 GitHub stars~2.9k tokensUpdated 1 mo ago
    Legal & ComplianceAuto-check passed

More from mukul975/Privacy-Data-Protection-Skills

All 280 skills in this repo
  • Age Gating Services

    mukul975/Privacy-Data-Protection-Skills

    Implements age-gating mechanisms for online services to restrict access based on user age.

    297 GitHub stars~3.7k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Data Retention

    mukul975/Privacy-Data-Protection-Skills

    Manages AI model retention and machine unlearning requirements.

    297 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • AI Dpia

    mukul975/Privacy-Data-Protection-Skills

    Conducts Data Protection Impact Assessments for AI and ML systems per EDPB Guidelines 04/2025 on AI processing.

    297 GitHub stars~3.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Dpia Mitigation Plan

    mukul975/Privacy-Data-Protection-Skills

    Structures risk mitigation planning and residual risk tracking for Data Protection Impact Assessments under GDPR Article 35(7)(d).

    297 GitHub stars~846 tokensUpdated 6 mo ago
    Auto-check passed
  • Gdpr Accountability

    mukul975/Privacy-Data-Protection-Skills

    Guides implementation of the GDPR accountability principle under Articles 5(2) and 24, including documentation requirements for policies, DPIAs, RoPA, training records, and breach logs.

    297 GitHub stars~1.9k tokensUpdated 6 mo ago
    Auto-check passed
  • Pia Threshold Screening

    mukul975/Privacy-Data-Protection-Skills

    Conducts pre-DPIA threshold screening to determine whether a full Data Protection Impact Assessment is required under GDPR Article 35.

    297 GitHub stars~880 tokensUpdated 6 mo ago
    Auto-check passed

Questions about Analytics Cookie Consent

What does Analytics Cookie Consent do?

Managing consent for analytics cookies and implementing privacy-preserving measurement. Analytics Cookie Consent is an agent skill from mukul975/Privacy-Data-Protection-Skills. Managing consent for analytics cookies and implementing privacy-preserving measurement.

When should I use Analytics Cookie Consent?

Analytics Cookie Consent fits situations like: tasks that involve Privacy and GDPR.

How do I install Analytics Cookie Consent in Claude Code?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill analytics-cookie-consent -a claude-code`. Or copy the skill folder (skills/privacy/analytics-cookie-consent in mukul975/Privacy-Data-Protection-Skills) into .claude/skills/analytics-cookie-consent in your project. Claude Code loads it when a task matches its description.

How do I install Analytics Cookie Consent in Codex?

Run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill analytics-cookie-consent -a codex`. Or copy the skill folder (skills/privacy/analytics-cookie-consent in mukul975/Privacy-Data-Protection-Skills) into .agents/skills/analytics-cookie-consent in your project. Codex loads it when a task matches its description.

Can I use Analytics Cookie Consent in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Privacy-Data-Protection-Skills --skill analytics-cookie-consent -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/analytics-cookie-consent, .gemini/skills/analytics-cookie-consent, .github/skills/analytics-cookie-consent and .opencode/skills/analytics-cookie-consent in your project.

What does Analytics Cookie Consent need to run?

Going by SKILL.md and its folder, Analytics Cookie Consent needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Analytics Cookie Consent access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Analytics Cookie Consent safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Analytics Cookie Consent use?

Analytics Cookie Consent is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Analytics Cookie Consent use?

About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 777 tokens, read only when the agent opens those files.

What are the alternatives to Analytics Cookie Consent?

Skills that share tags, products or a category with Analytics Cookie Consent: C15t (c15t/c15t, 1.9k stars), SEO Analitica (ricneves-ai/flowgrammers-skills, 115 stars), Ga4 Privacy Compliance (Microck/ordinary-claude-skills, 404 stars) and Analytics (ericrisco/rsc-harness, 174 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Analytics Cookie Consent?

mukul975 (a GitHub user) maintains it in mukul975/Privacy-Data-Protection-Skills, which has 297 GitHub stars. The repository holds 280 skills in this directory. The repository was last updated on March 16, 2026.

Source: mukul975/Privacy-Data-Protection-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.