Cookie/CMP Compliance Guide
This guide provides a comprehensive framework for designing and implementing a Consent Management Platform (CMP) compliant with key regulations like GDPR (Article 6, 7, 49), ePrivacy Directive (as amended), CCPA/CPRA, and IAB Transparency & Consent Framework (TCF v2.2). It focuses on categories, consent UX, proof records, and dark pattern checks to ensure valid, granular, freely given consent.
Key Principles:
- Consent must be freely given, specific, informed, and unambiguous (opt-in only; no pre-ticked boxes).
- Legitimate interests can justify non-essential cookies without consent, but marketing requires explicit opt-in.
- Re-evaluate consent every 6-12 months.
- Support legitimate interest toggles and Global Privacy Control (GPC) signals.
1. Cookie Categories
Classify cookies/trackers into 6 standard IAB TCF categories (expandable for custom needs). Use these for granular consent. Strictly Necessary cookies never require consent but must be documented.
| Category | Description | Examples | Requires Consent? | Legitimate Interest Possible? |
|---|
| Strictly Necessary (N) | Essential for site functionality; cannot be disabled. | Session ID, CSRF tokens, basic login. | No | N/A |
| Preferences (PREF) | Remember user choices (e.g., language, theme). | Language selectors, widget settings. | Yes | Yes (toggle) |
| Statistics (STATISTICS) | Analytics for site performance (anonymized where possible). | Google Analytics (GA4), Matomo. | Yes | Yes (opt-out via legitimate interest) |
| Marketing (MARKETING) | Personalized ads, retargeting. | Facebook Pixel, Google Ads, Criteo. | Yes | Yes (but explicit opt-in preferred) |
| Content Personalization | Tailored content recommendations. | Spotify embeds, news feeds. | Yes | Yes |
| Social Media | Social login/sharing buttons. | Facebook Like, Twitter embed. | Yes | Yes |
Implementation Tips:
- Map all vendors/scripts to categories via CMP (e.g., OneTrust, Cookiebot).
- Use purpose IDs (e.g., IAB TCF: 1=Strictly Necessary, 2=Preferences).
- Display vendors grouped by category in UX.
- Audit quarterly: Scan with tools like CookieYes or WebPrivacyCensus.
2. Consent UX Best Practices
Design for transparency, ease, and granularity. Banner must appear on first visit (or reload) and persist until interaction. Use two-layer UX: High-level summary + detailed toggles.
Banner/Modal Design
-
Position: Top/bottom of viewport (non-fullscreen on mobile).
-
Copy Examples:
| Element | Compliant Example | Non-Compliant (Avoid) |
|---|
| Headline | "We use cookies to improve your experience" | "Accept cookies for best experience!" |
| Description | "Manage preferences or accept all. Strictly necessary cookies are always on." | "This site uses cookies. Accept?" |
| Buttons | "Manage Settings" | "Reject All" | "Accept All" (equal size/weight) | "Accept" (large/green) | "Settings" (small/gray) |
-
Layer 1 (Summary): Toggle all non-essential categories ON by default? No—start OFF for opt-in compliance.
[ ] Preferences [ ] Statistics [ ] Marketing
Reject All Accept Selected Accept All
-
Layer 2 (Detailed): Vendor-level toggles + legitimate interest explanations.
Statistics:
[ ] Google Analytics (Measures traffic)
Legitimate Interest: Yes/No toggle
Vendor List (Searchable, 50+ vendors max visible)
Mobile & Accessibility
- Touch-friendly: 48x48px buttons.
- WCAG 2.1 AA: High contrast (4.5:1), screen-reader friendly (ARIA labels:
aria-label="Reject all cookies").
- Back button: Preserve choices on navigation.
Advanced Features
- Geo-targeting: Skip banner in non-regulated regions (e.g., no CCPA in EU).
- GPC Support: Auto-reject if detected.
- Revoke: Persistent footer link "Cookie Settings" → Re-open banner.
Testing Checklist:
- Load time <2s.
- No blocking of core content.
- Works in incognito/private mode.
3. Proof Records (Audit Trails)
Store immutable proof of consent for 6+ years (GDPR Art. 7(1)). Use IAB TCF TC String for interoperability.
What to Record
| Data Point | Required? | Format/Example | Storage Notes |
|---|
| TC String | Yes (if TCF) | CPZ6vAPZ6vAPZ6vAYENB... (base64) | Decodable for audits. |
| Timestamp | Yes | ISO 8601: 2024-10-01T12:00:00Z | UTC, precise to second. |
| Consent Actions | Yes | {categories: {STATISTICS: true}, vendors: [123,456]} | JSON, signed (HMAC/JWS). |
| User Agent | Yes | Full UA string + IP hash | Anonymized IP. |
| Event Type | Yes | consent-given, consent-withdrawn, legit-interest-optout | Log all changes. |
| GPC Signal | If present | true/false | Auto-trigger. |
Storage & Access
- Backend: Secure DB (e.g., PostgreSQL with encryption at rest). Key by
hashed_user_id (e.g., SHA-256 of email/IP).
- Retention: 6 years min; auto-purge inactive.
- Audit API: Expose
/consent-proof/{user_id}?from=YYYY&to=YYYY for DSARs/audits.
- Signing: Use ECDSA signatures for tamper-proofing.
{
"tcString": "CPZ6vAPZ6vAPZ6vAYENB...",
"signature": "MEUCIQD...==",
"timestamp": "2024-10-01T12:00:00Z"
}
Implementation:
- CMPs like Quantcast or Sourcepoint handle this natively.
- Log to SIEM (e.g., Splunk) for regulators.
4. Dark Pattern Checks
Dark patterns invalidate consent (EDPB Guidelines 05/2020). Use this checklist pre-launch and quarterly.
| Dark Pattern | Description | Check | Fix |
|---|
| Pre-selected Boxes | Defaults ON for non-essential. | Scan JS for checked=true. | All OFF on load. |
| Misleading Labels | "Reject All" saves nothing/sets minimal. | Test: Reject → No trackers fire? | True reject: All OFF. |
| Unequal Buttons | Accept larger/brighter. | Measure: Button sizes/colors equal? | Same size, neutral colors. |
| Nagging | Re-prompts without change. | Simulate 3 visits: Persists? | Cookie consent_banner_dismissed (1 year). |
| Hidden Reject | No clear "Reject All". | A/B test usability. | Prominent, equal to Accept. |
| Confusing Copy | "Required cookies always on" hidden. | Readability score >60 (Flesch). | Plain language, tooltips. |
| Sneak into Basket | Bundles consent with other actions. | No multi-purpose modals. | Standalone banner. |
| Forced Action | No-continue-without-accept. | Core content accessible pre-consent? | Yes (Necessary only). |
| Forgetful Friction | Revoke hard to find. | <3 clicks to revoke? | Footer link always visible. |
Tools for Checks:
- Web.dev Cookie Audit.
- EDPB Dark Patterns Scanner (open-source).
- User Testing: 10 users; measure opt-out rate >20%? Red flag.
Compliance Scorecard (Self-Assess):
| Section | Score (0-10) | Notes |
|---|
| Categories | | |
| Consent UX | | |
| Proof Records | | |
| Dark Patterns | | |
| Total | | Target: 40/40 |
Next Steps & Resources
- Integrate CMP: Start with free/open-source (e.g., CookieConsent) or enterprise (CookiePro).
- Audit Site: Use Cookiebot Scanner.
- Legal Review: Consult DPO for jurisdiction-specific tweaks (e.g., Brazil LGPD).
- Resources: EDPB Guidelines 05/2020, IAB TCF Policies, CNIL Cookie Banner Guide.
This guide ensures audit-ready compliance. For custom implementation or Trailblazer Labs tools, reply with site details! 🕵️♂️