cookieconsent

cookieconsent#

GDPR-compliant cookie consent tracking with granular per-category preferences.

Models#

Model

Description

CookieConsent

One-to-one with User — tracks necessary, analytics, and marketing consent

URL Routes#

Path

View

Description

/cookies/update/

consent_update

POST: accept JSON consent preferences

Key Design Decisions#

  • Versioned consent: consent_version field tracks which version of the privacy policy the user consented to, enabling re-prompting when the policy changes.

  • Three categories: necessary (always true), analytics, marketing — matching the standard EU cookie categories.

  • One-to-one with User: Anonymous visitors get a session-based consent; authenticated users get a persistent database record.