Tracking user consent is very important to keep in compliance with regulation such as GDPR and CCPA, and is good practice to keep your users happy. We offer extensive support for granular consent tracking.
Operations on user Profile data use the message type consent.
Operations
The operations parameter takes an array of operations. These can be of the following type:
set - add a consent for a type and value
unset - remove a consent for a type and value
Set
Simple Consent
You can set a basic user consent as in the example below, which indicates the user has consented to email at the address person@example.com.
A user may only give consent for a specific purpose ie "marketing". You can add these details to a set operation by adding a purpose attribute. This is an array of objects, with the type of the purpose supplied.
This example adds consent for both "marketing" and "transactional" emails:
A user may only want to be contacted for a specific purpose about certain topics. For example a user may only want to get "marketing" material from you about "Men's Shoes" and "Bridal wear".
This example adds topics to the "marketing" purpose:
If topics are supplied they will override any existing topics for a given purpose. You cannot use this to remove all topics by sending an empty array ie topics: [] though.
Unset
This example removes the email consent for the email address person@example.com. Unset does not take any purpose or topics and these can only be changed using the set type.