Skip to main content

CMP Consent Architecture

Technical overview of the CMP consent system.

Components

  • ConsentCore: Core consent state management
  • ConsentUI: Banner and preferences dialog
  • TagManager: Third-party tag loading
  • Storage: Consent persistence
  1. User visits site
  2. CMP checks for existing consent
  3. If no consent, show banner
  4. User makes choice
  5. Consent stored and tags loaded/blocked accordingly

Data Model

interface ConsentState {
version: number;
categories: {
necessary: boolean;
analytics: boolean;
marketing: boolean;
preferences: boolean;
};
timestamp: string;
}