Messaging Lists
This topic describes how to subscribe and unsubscribe identifiers from messaging Lists in Optimizely Data Platform (ODP).
Messaging Lists allow you to group customers for the purposes of tracking their communication preferences. For example, allowing customers to subscribe to your company newsletter or for holiday news.
Note
ODP does not require customers to be subscribed to a List to receive emails.
// subscribe [email protected] to newsletter list
zaius.subscribe({list_id: 'newsletter', email: '[email protected]'});
// unsubscribe [email protected] from newsletter list
zaius.unsubscribe({list_id: 'newsletter', email: '[email protected]'});
// subscribe [email protected] to three lists at once
zaius.subscribe({
list_id: ["newsletter", "promotion", "product_update"],
email: "[email protected]"
});
// unsubscribe [email protected] from multiple lists at once
zaius.unsubscribe({
list_id: ["newsletter", "product_update"],
email: "[email protected]"
});
zaius.subscribe({
// subscribe Johnny to all lists
list_id: ["newsletter", "promotion", "product_update"],
email: "[email protected]",
// update Johnny's record to include his full name
first_name: "Johnny",
last_name: "Zaius",
// store information on the subscribe events
event_custom_field: "my custom value",
custom_number_field: 123
});
// zaius.unsubscribe also fully supports this syntax.
Events
ODP generates events automatically for the purposes of analytics and auditing. The events are structured as follows:
Event Type | Event Action | List ID | Data/Time |
---|---|---|---|
list | subscribe | newsletter | 123456 |
list | unsubscribe | newsletter | 123456 |
Updated 3 months ago
Did this page help you?