Context API Object
Overview
The consent object defines a user’s explicit preferences regarding the collection and use of their data across different categories such as analytics, personalization, and marketing. It ensures that all data processing activities respect user choices and comply with applicable privacy regulations.
This object is specifically designed to provide a clear and standardized way to capture, store, and transmit consent signals. By including it in API requests or tracking events, systems can guarantee that downstream processing, reporting, and integrations always honor the user’s privacy settings.
Each consent object reflects the state of a user’s permissions at the moment of interaction, making it a critical component for lawful data handling and transparent communication of consent across multiple platforms.
Core Structure
The consent object consists of several required boolean properties:
- Analytics – Consent for collecting and processing data for performance monitoring, service optimization, and usage statistics.
- Personalization – Consent for collecting and processing data to tailor user experiences and customize content delivery.
- Marketing – Consent for collecting and processing data for advertising, remarketing, and campaign effectiveness measurement.
Complete Reference
consent object
analytics boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for analytical purposes, such as performance monitoring, usage statistics, and service optimization.
analytics: true
personalization boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for personalization purposes, enabling tailored experiences and content customization.
personalization: true
marketing boolean required
Indicates the user’s explicit consent regarding the collection and processing of data for marketing purposes, such as targeted advertising, remarketing, and campaign measurement.
marketing: true
Implementation Examples
- Complete
{
analytics: true,
personalization: false,
marketing: true
}