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
Consent Flow
- User visits site
- CMP checks for existing consent
- If no consent, show banner
- User makes choice
- Consent stored and tags loaded/blocked accordingly
Data Model
interface ConsentState {
version: number;
categories: {
necessary: boolean;
analytics: boolean;
marketing: boolean;
preferences: boolean;
};
timestamp: string;
}