Analytics Cookie Consent logo

Analytics Cookie Consent

Community
mukul975
analytics-cookie-consent

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.

Overview

Publishermukul975
RepositoryPrivacy-Data-Protection-Skills
Skill nameanalytics-cookie-consent
Stars
279
Forks
59
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mukul975 on GitHub. Read the source before you install it.

Installation

Install the Analytics Cookie Consent AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mukul975/Privacy-Data-Protection-Skills.git /tmp/Privacy-Data-Protection-Skills
mkdir -p .claude/skills
cp -r /tmp/Privacy-Data-Protection-Skills/plugins/cookie-consent-skills/skills/analytics-cookie-consent .claude/skills/analytics-cookie-consent
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analytics Cookie Consent in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analytics Cookie Consent on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analytics Cookie Consent is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Managing Consent for Analytics Cookies

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

Consent Mode Integration

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.

Analytics Without Consent — CNIL Exemption Criteria

CNIL Cookie Exemption for Audience Measurement

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

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)

Consent Rate Impact Analysis

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

Key Legal and Technical References

  • 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Analytics Cookie Consent AI skill do?

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.

Why use Analytics Cookie Consent on TypingMind?

Because you install it once and use it with any model. Analytics Cookie Consent is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analytics Cookie Consent in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/cookie-consent-skills/skills/analytics-cookie-consent. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Analytics Cookie Consent?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analytics Cookie Consent?

As many as you like. As long as a model supports skills, you can use Analytics Cookie Consent with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analytics Cookie Consent AI skill free?

Yes. It is published on GitHub by mukul975 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇