Consent Management
The Engagement Mobile SDK provides a comprehensive, managed solution for handling user consent regarding the collection and transmission of event data. This feature is essential for compliance with privacy regulations such as GDPR, CCPA, and other regional privacy laws that require explicit user consent before collecting personal data.
Your mobile application is responsible for:
- Presenting clear consent options to device owners about data collection practices
- Collecting user preferences through appropriate UI components (consent dialogs, settings screens, etc.)
- Setting the Data Cloud Module consent property based on user choice
- Handling consent changes when users modify their preferences
- Storing consent state persistently across app sessions
The SDK automatically manages data collection behavior based on the consent state you set, ensuring compliance and providing a seamless user experience.
This table describes the Data Cloud Module consent states.
iOS Values | Android Values | Description |
---|---|---|
Consent.optIn | Consent.OPT_IN | In this state, events are transmitted to the configured Data Cloud endpoint for collection. If queued events are present, the Data Cloud Module transmits them immediately to Data Cloud. |
Consent.optOut | Consent.OPT_OUT | In this state, events created by the mobile application are ignored by the SDK. The events are never queued or transmitted off the device. If queued events are present, the Data Cloud Module deletes them from memory. |
Consent.pending | Consent.PENDING | The default consent value for a newly initialized Data Cloud Module is pending. In this state, events are collected locally until an opt-in or opt-out state is set. |
The Data Cloud Module can't transmit events from a mobile device to Data Cloud until the mobile application has collected customer consent for data collection.
If no prior consent has been set, then the initial state is pending. In this state, events are queued locally until consent is granted or revoked. If consent is granted, the queued events are transmitted to Data Cloud. If revoked, they're deleted from the queue.
Access the current state of consent in the Data Cloud Module: