AWS Data Feed
When you connect your Leanplum Data Feed to an Amazon S3 bucket, Leanplum will start streaming Leanplum Campaign Events in the form of JSON files, which you can then ETL into your data warehouse or data lake, or query using RedShift.
Leanplum Campaign Events drive deeper analytics
Leanplum customers utilize Leanplum Campaign Events they receive via the Data Feed for both pure CRM analytics use cases and broader product analytics use cases, where they cross data coming from the Leanplum Data Feed with other sources in their stacks.
Configuration
To set up the integration go to Partner Integrations > Amazon S3.
- Enter the bucket name where you want the data feed to stream the events
(Optional) Enter a bucket subfolder if you want the event files to be placed in a subfolder
NB. Leanplum will create the subfolder for you, no need to create it on your own
- Choose the file format you would like to receive the files in. You can choose between JSON and Parquet files.
- Grant Leanplum Access to the bucket in Amazon S3
-
Copy the configuration and apply it to your bucket policy in Amazon S3 to give the needed access rights to Leanplum.
-
Go to your bucket in the Amazon S3 administration pane and select the Permissions tab
- Scroll down to the Bucket policy section and click Edit
- Paste the bucket policy configuration and click on "Save Changes"
- Check the integration to make sure it is correctly set up
Save the integration by clicking on the top right Save button.
Streaming approach
Once configured, the Leanplum Data Feed will start generating files in your configured bucket and folder based on the events happening from that moment on (without historical data).
File formats
The data feed is available in both JSON and Parquet file formats.
Naming and structure
The files will be named using a partition key dt=. Some events that occured on certain date with time soon after 00:00 can be filed to the previous date subfolder and some of the events with time near to 23:59 can be filed to the next date subfolder.
The schema is provided for each event below, in the supported events section.
Frequency
For the JSON format, new files with events will be added after 1 hour or around 50,000 events (whichever happens first).
For the Parquet format, new files with events will be added after 1 hour or around 2m events (whichever happens first).
Scope
All Campaign Events which are in the supported list below will be streamed - those are the events which are generated by Leanplum as a result of your Campaigns orchestration. No custom events will be included - if you want to report on custom events together with Campaign Events, we recommend that you track your custom events in parallel directly to your data warehouse or other centralized customer data store and combine them by User ID.
Duplicated events
We expect that some events might be sent more than once due to timing of the different pipelines. For this reason, all events should either be de-duplicated on the client side during the ETL process or the analysis should be done on unique count of events.
Duplicated events can be easily identified because they will have the same event id.
Supported Events
The following events will be sent to AWS S3 bucket with the respective properties:
Campaign Enter
Fires when a user enters a campaign.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Campaign ",
"description": "Formatted event name based on event type (e.g. '(Leanplum) Campaign Enter')."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the campaign."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum campaign id."
},
"event_type": {
"type": "string",
"default": "",
"description": "Enter"
}
}
}
}
Campaign Convert
Fires when a user triggers the conversion event for a multi-conversion campaign.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Campaign ",
"description": "Formatted event name based on event type (e.g. '(Leanplum) Campaign Enter')."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the campaign."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum campaign id."
},
"event_type": {
"type": "string",
"default": "",
"description": "Convert"
}
}
}
}
Campaign Exit
Fires when a user triggers the conversion event for a single-conversion campaign during the attribution window.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Campaign ",
"description": "Formatted event name based on event type (e.g. '(Leanplum) Campaign Enter')."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the campaign."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum campaign id."
},
"event_type": {
"type": "string",
"default": "",
"description": "Exit"
}
}
}
}
Campaign Forced Exit
Fires when a user is kicked out of a campaign due to an "Exit Action".
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Campaign ",
"description": "Formatted event name based on event type (e.g. '(Leanplum) Campaign Enter')."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the campaign."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum campaign id."
},
"event_type": {
"type": "string",
"default": "",
"description": "Forced Exit"
}
}
}
}
Campaign Triggered
Fires when a user triggers the start of the campaign but has not yet entered.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Campaign ",
"description": "Formatted event name based on event type (e.g. '(Leanplum) Campaign Enter')."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the campaign."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum campaign id."
},
"event_type": {
"type": "string",
"default": "",
"description": "Triggered"
}
}
}
}
Email Sent
Fires when an email is sent to a user.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Delivered
Fires when an email is delivered to a user.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Deferred
Fires when an email is deferred.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Bounce
Fires when an email bounces.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Open
Fires when an email is opened.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Clicked
Fires when the user clicks a link in the email.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Marked as Spam
Fires when the user marks the email as spam.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Unsubscribed
Fires when the user unsubscribes from an email.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
Email Dropped
Fires when the email is dropped.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
},
"email_id": {
"type": [null, "string"],
"default": null,
"description": "Unique email id. Only for email events."
},
"link_url": {
"type": [null, "string"],
"default": null,
"description": "The url of the clicked email link. Only for email click events."
},
"link_id": {
"type": [null, "string"],
"default": null,
"description": "The id of the clicked email link. Only for email click events."
}
}
}
}
App Inbox Sent
Fires when the message is sent to the app inbox.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
App Inbox Opened
Fires when the user opens the app inbox message.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
In-App Message Viewed
Fires when a user views an in-app message.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
In-App Message Accept
Fires when a user accepts a Center Popup, Confirm, Interstitial in-app message.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
In-App Message Submit
Fires when a user submits a Satisfaction Survey in-app message.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
In-App Message Select
Fires when a user selects a Banner or Rich interstitial in-app message.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
Push Notification Sent
Fires when a push notification is sent to a user.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
Push Notification Opened
Fires when a user taps a push notification.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
Push Notification Bounced
Fires when a push notification bounces (e.g. because of wrong push token).
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
Webhook Sent
Fires when a webhook is send.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"default": "(Leanplum) Message ",
"description": "Formatted event name based on channel and event type (e.g. '(Leanplum) Email Open')."
},
"properties": {
"type": "object",
"description": "A collection of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"message_occurrence_id": {
"type": "string",
"default": "",
"description": "Unique message id related to the particular message occurrence."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the message."
},
"message_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum message id."
},
"event_type": {
"type": "string",
"default": "",
"description": "The event type (e.g. Send, Delivered, Open, etc.)."
},
"channel": {
"type": "string",
"default": "",
"description": "The channel of the message (Email, Push Notification, In App Message, App Inbox, Webhook)."
},
"campaign_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum parent campaign id. Only for messages part of a campaign."
},
"campaign_name": {
"type": "string",
"default": "",
"description": "The Leanplum parent campaign name. Only for messages part of a campaign."
}
}
}
}
A/B Test Impression
Fires when a user is assigned to an A/B test.
{
"event_id": {
"type": "string",
"description": "Unique event id. Can be used for deduplication."
},
"name": {
"type": "string",
"value": "(Leanplum) A/B Test Impression",
"description": "Formatted event name."
},
"properties": {
"type": "object",
"description": "A set of properties associated with this event.",
"properties": {
"user_id": {
"type": "string",
"default": "",
"description": "The Leanplum user id. Empty if anonymous."
},
"device_id": {
"type": "string",
"default": "",
"description": "The device id."
},
"time": {
"type": "string",
"default": "1970-01-01 00:00:00.000",
"description": "The time event occurred. Format - 'yyyy-MM-dd HH:mm:ss.SSS'."
},
"name": {
"type": "string",
"default": "",
"description": "The name of the A/B test."
},
"ab_test_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum A/B test id."
},
"variant_id": {
"type": "integer",
"default": 0,
"description": "The Leanplum variant id the user has entered."
}
}
}
}
Parquet format
All of the events above will be sent in the below format if the parquet format is chosen.
{
"namespace": "com.leanplum.partners.feed.models.avro",
"type":"record",
"name":"Event",
"fields":[
{
"name":"schema_version",
"type":"int"
},
{
"name":"name",
"type":"string"
},
{
"name":"event_id",
"type":"string"
},
{
"name":"user_id",
"type":[
"null",
"string"
]
},
{
"name":"device_id",
"type":[
"null",
"string"
]
},
{
"name":"time",
"type":"long"
},
{
"name": "user_attributes",
"type": [
"null",
{
"type": "map",
"values": "string",
"default": {}
}
]
},
{
"name": "user_attributes_numeric",
"type": [
"null",
{
"type": "map",
"values": "long",
"default": {}
}
]
},
{
"name":"AbTest",
"type":[
"null",
{
"name":"AbTest",
"type":"record",
"namespace": "com.leanplum.partners.feed.models.avro",
"fields":[
{
"name":"name",
"type":[
"null",
"string"
]
},
{
"name":"id",
"type":"long"
},
{
"name":"variant_id",
"type":[
"null",
"long"
]
}
]
}
]
},
{
"name":"Campaign",
"type":[
"null",
{
"name":"Campaign",
"type":"record",
"fields":[
{
"name":"name",
"type":[
"null",
"string"
]
},
{
"name":"id",
"type":"long"
},
{
"name":"event_type",
"type":"string"
}
]
}
]
},
{
"name":"Message",
"type":[
"null",
{
"name":"Message",
"type":"record",
"fields":[
{
"name":"name",
"type":[
"null",
"string"
]
},
{
"name":"id",
"type":"long"
},
{
"name":"campaign_name",
"type":[
"null",
"string"
]
},
{
"name":"campaign_id",
"type":[
"null",
"long"
]
},
{
"name":"channel",
"type":[
"null",
"string"
]
},
{
"name":"message_occurrence_id",
"type":[
"null",
"string"
]
},
{
"name":"email_id",
"type":[
"null",
"string"
]
},
{
"name":"link_url",
"type":[
"null",
"string"
]
},
{
"name":"link_id",
"type":[
"null",
"string"
]
},
{
"name":"event_type",
"type":"string"
}
]
}
]
}
]
}
Updated over 2 years ago