Question
How to add consent object to your events in Segment?
Product
Twilio Segment
Environment
Segment Console
Answer
It's necessary for every event from all of your sources to include the end-user preferences that are captured by your Consent Management Platform in the form of a consent object.
The consent object is a JSON object nestled within the context object with the following format:
{
"context": {
"consent": {
"categoryPreferences": {
"Advertising": true,
"Analytics": false,
"Functional": true,
"DataSharing": false
}
}
}
}
If you're using Segment’s OneTrust wrapper, then the consent object will be automatically added to your events but you can also include it manually in case you are using a different management platform.
Additional Information
Know more about fixing conflicts between your consent object and your integration object and between your Consent Management Platform and the consent categories you configured in the Segment app.