This article explores the architectural challenges and solutions for managing cookie consent across multiple domains. It differentiates between centralized CMP management and actual cross-domain consent sharing, detailing various architectural patterns like shared cookies for subdomains, CMP-supported sharing, and server-side synchronization for authenticated users. The discussion covers browser security boundaries, data models for consent, and rigorous testing methodologies.
Read original on Dev.to #architectureManaging cookie consent becomes significantly more complex when an organization operates across multiple distinct domains or subdomains (e.g., example.com, shop.example.com, example.co.uk). A common misconception is that a single Consent Management Platform (CMP) dashboard automatically enables cross-domain consent transfer. In reality, browser security boundaries and different technical requirements necessitate specific architectural considerations for sharing a user's consent choice across various websites.
Several architectural patterns address the challenge of sharing consent, each with its own applicability and considerations:
{
"consent_id": "cns_2027_102",
"site_id": "ecommerce_website",
"domain": "shop.example.com",
"visitor_id": "visitor_pseudonymous_001",
"timestamp": "2027-03-10T10:20:00Z",
"categories": {
"necessary": true,
"analytics": false,
"advertising": false
},
"banner_version": "v2.1",
"policy_version": "2027-03",
"configuration_id": "cfg_shop_102"
}This illustrative model highlights key fields for a consent event, emphasizing the need to tie consent records to specific websites and configurations to prevent confusion and ensure legal compliance.