Logo: Cookie Lifetime Audit

Cookie Lifetime Audit

Communautéit
mukul975
cookie-lifetime-audit

Auditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.

Iwwersiicht

Editeurmukul975
RepositoryPrivacy-Data-Protection-Skills
Skill-Nummcookie-lifetime-audit
Stären
279
Forks
59
Matgeliwwert Dateien
4
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    mukul975 huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Cookie Lifetime Audit an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/cookie-consent-skills/skills/cookie-lifetime-audit
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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/cookie-lifetime-audit .claude/skills/cookie-lifetime-audit
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Cookie Lifetime Audit an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Cookie Lifetime Audit automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Cookie Lifetime Audit net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Auditing Cookie Lifetimes

Overview

Cookie lifetime is a critical compliance factor often overlooked in consent implementations. The CNIL recommends a maximum cookie lifetime of 13 months from the point of collection, after which consent must be renewed. The CJEU in Planet49 (Case C-673/17) established that cookie duration must be disclosed to users before consent is obtained. Additionally, browser-enforced restrictions — Safari's Intelligent Tracking Prevention (ITP), Firefox's Enhanced Tracking Protection (ETP), and Chrome's third-party cookie deprecation — impose technical limits on cookie lifetimes that may conflict with server-set durations. A cookie lifetime audit identifies cookies exceeding regulatory or technical limits and ensures accurate duration disclosure.

Cookie Duration Classification

Session vs. Persistent Cookies

TypeDurationBehaviorConsent Implications
Session cookieNo Expires or Max-Age attributeDeleted when browser closesStill requires consent if non-essential under ePrivacy Art. 5(3)
Persistent cookieHas Expires or Max-AgeSurvives browser restartRequires consent; duration must be disclosed (Planet49)
Server-refreshedReset on each visit via Set-CookieEffectively indefinite if user visits regularlyDuration is from last visit, not first set — must disclose rolling nature

Duration Categories

CategoryDuration RangeExamplesRegulatory Concern
Short-lived< 24 hoursSession IDs, CSRF tokensLow — typically strictly necessary
Medium-lived24 hours - 30 daysA/B test assignments, session replayMedium — review necessity
Long-lived30 days - 13 monthsAnalytics IDs, preference cookiesHigh — must justify duration
Excessive> 13 monthsLegacy tracking cookies, _ga (2 years)Very high — CNIL non-compliant duration

CNIL 13-Month Recommendation

Regulatory Basis

CNIL's Recommendation on Cookies (1 October 2020, following Deliberation 2020-091 of 17 September 2020) states:

"The duration of validity of the consent of the user to the deposit of trackers should not exceed thirteen months. At the end of this period, the consent of the user should be collected again."

This 13-month maximum applies to:

  • The consent cookie itself (the cookie that records the user's consent choice)
  • Non-essential tracking cookies (the cookies enabled by consent)

Impact on Common Cookies

Cookies Exceeding CNIL 13-Month Limit:

CookieDefault DurationSet ByCNIL CompliantRemediation
_ga2 years (730 days)Google AnalyticsNo — exceeds 13 monthsSet cookie_expires to 34128000 (395 days / ~13 months)
_ga_XXXXXXX2 yearsGA4No — exceeds 13 monthsSet cookie_expires to 34128000
IDE13 monthsDoubleClickBorderline compliantMonitor — at the limit
fr90 daysMeta/FacebookYesNo action needed
_gcl_au90 daysGoogle AdsYesNo action needed
hjSessionUser*1 yearHotjarYes — under 13 monthsNo action needed
NID6 monthsGoogle SearchYesNo action needed

GA4 Cookie Lifetime Configuration for Pinnacle E-Commerce Ltd

Override default GA4 cookie duration to comply with CNIL:

gtag.js implementation:

javascript
gtag('config', 'G-PINNACLE123', {
  'cookie_expires': 34128000,     // 395 days (~13 months) in seconds
  'cookie_update': true,           // Refresh cookie on each visit
  'cookie_domain': '.pinnacle-ecommerce.com',
  'cookie_flags': 'SameSite=Lax;Secure'
});

GTM implementation: In the GA4 Configuration tag, set the field:

  • Field name: cookie_expires
  • Value: 34128000

Browser-Enforced Lifetime Restrictions

Safari Intelligent Tracking Prevention (ITP)

Safari imposes strict cookie lifetime caps:

Cookie TypeITP RuleEffective Lifetime
Client-side JavaScript cookie (document.cookie)Capped at 7 days7 days maximum
Client-side JS cookie with link decoration (e.g., ?gclid=)Capped at 24 hours24 hours
Server-set cookie (Set-Cookie header), first-partyNo capAs set by server
Server-set cookie, classified as trackingCapped at 7 days7 days
Third-party cookieBlocked entirely0 (cannot be set)
LocalStorageCapped at 7 days7 days

Impact on Pinnacle E-Commerce Ltd:

  • GA4 _ga cookie set via JavaScript: Effective lifetime is 7 days on Safari, not 2 years
  • Server-side tagging (via data.pinnacle-ecommerce.com) sets _ga via Set-Cookie header: Full configured lifetime applies
  • Google Ads click IDs in URL parameters: _gcl_au cookie capped at 24 hours on Safari

Firefox Enhanced Tracking Protection (ETP)

SettingDefault (Standard)Strict
Third-party tracking cookiesBlockedBlocked
Cross-site tracking cookiesBlockedBlocked
First-party tracking cookiesAllowedLimited to 7 days (if tracker classified)
Fingerprinting scriptsBlockedBlocked
Cryptomining scriptsBlockedBlocked

Chrome Third-Party Cookie Changes

As of 2025, Chrome has moved toward a user-choice model for third-party cookies rather than full deprecation:

PhaseStatusImpact
Privacy Sandbox APIs availableActiveTopics API, Attribution Reporting API available
Third-party cookie user controlsActiveUsers can block third-party cookies in settings
IP Protection (Gnatcatcher)In developmentMay affect IP-based tracking

Cookie Lifetime Audit Process

Step 1: Extract Current Cookie Lifetimes

For each cookie on pinnacle-ecommerce.com, record:

Cookie NameDomainSet ByDeclared DurationActual Max-Age/ExpiresRefreshed on VisitCategory
_ga.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_ga_PINNACLE.pinnacle-ecommerce.comJavaScript2 yearsMax-Age=63072000YesAnalytics
_gid.pinnacle-ecommerce.comJavaScript24 hoursMax-Age=86400YesAnalytics
_fbp.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_fbc.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
_gcl_au.pinnacle-ecommerce.comJavaScript90 daysMax-Age=7776000NoAdvertising
session_id.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
csrf_token.pinnacle-ecommerce.comServerSessionNo Max-AgeN/ANecessary
locale.pinnacle-ecommerce.comServer1 yearMax-Age=31536000NoFunctionality
consent_state.pinnacle-ecommerce.comJavaScript6 monthsMax-Age=15768000NoNecessary

Step 2: Compare Against Limits

CookieServer-Set DurationCNIL 13-Month LimitSafari ITP LimitCompliantAction Required
_ga2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_ga_PINNACLE2 yearsExceeds7 days (JS)NoReduce to 13 months; move to server-side
_gid24 hoursWithin7 days (JS)YesNone
_fbp90 daysWithin7 days (JS)PartialMove to server-side for Safari
locale1 yearWithinNo cap (server)YesNone
consent_state6 monthsWithin7 days (JS)PartialMove to server-side; aligns with CNIL 6-month reconsent

Step 3: Verify Disclosure Accuracy

Compare actual cookie lifetimes with durations stated in the cookie policy:

CookiePolicy StatesActual DurationAccurate
_ga"up to 2 years"2 yearsYes — but update to reflect 13-month override
_fbp"3 months"90 daysYes
locale"12 months"1 yearYes
_gid"24 hours"24 hoursYes

Step 4: Generate Remediation Plan

For Pinnacle E-Commerce Ltd:

  1. Immediate: Override GA4 cookie duration to 13 months (cookie_expires: 34128000)
  2. Short-term: Implement server-side tagging for _ga, _fbp cookies to bypass Safari ITP 7-day cap
  3. Medium-term: Implement automatic consent recollection at 6 months (CNIL reconsent cycle)
  4. Ongoing: Add cookie lifetime checks to CI/CD pipeline — flag any new cookie with duration > 13 months

Key Legal and Technical References

  • CNIL Deliberation No. 2020-091 (17 September 2020) — 13-month maximum cookie lifetime recommendation
  • CNIL Recommendation on Cookies (1 October 2020) — Practical implementation of lifetime limits
  • CJEU Case C-673/17 (Planet49), para. 81 — Cookie duration must be disclosed before consent
  • ePrivacy Directive 2002/58/EC, Article 5(3) — Consent required for non-essential cookie storage
  • Apple WebKit ITP Documentation — Safari cookie lifetime restrictions
  • Mozilla ETP Documentation — Firefox tracking protection policies
  • Google Privacy Sandbox Timeline — Chrome third-party cookie deprecation status
  • GDPR Article 5(1)(e) — Storage limitation principle applicable to cookie-stored personal data

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Cookie Lifetime Audit?

Auditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.

Firwat Cookie Lifetime Audit op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Cookie Lifetime Audit besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Cookie Lifetime Audit an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/mukul975/Privacy-Data-Protection-Skills/tree/main/plugins/cookie-consent-skills/skills/cookie-lifetime-audit an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Cookie Lifetime Audit benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Cookie Lifetime Audit benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Cookie Lifetime Audit domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Cookie Lifetime Audit gratis?

Jo. mukul975 huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇