HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityLog In

Consent

This topic describes how to set a customer's consent for receiving marketing communication in Optimizely Data Platform (ODP).

๐Ÿšง

Important

Users who are opted-out cannot receive marketing messages from ODP. Only transactional messages will be received by these users.

Opt-In/Opt-out

Field

Value

consent (optional)

Boolean; defaults to true

identifier_field_name (optional)

defaults to 'email'

identifier_value (optional)

string

update_reason (optional)

string

update_ts (optional)

timestamp; defaults to current time

event_data (optional)

object holding additional event fields

Opt-In

zaius.consent({
  consent: true,
  identifier_field_name: 'email',
  identifier_value: '[email protected]',
  update_reason: '',
  update_ts: 123456789,
  event_data: {}
  });

Events

ODP generates events automatically for the purposes of analytics and auditing. The events are structured as follows:

Event Type

Event Action

consent

opt-in

consent

opt-out


Did this page help you?