Standard Exporting of Events
Zeta Marketing Platform generates a standard event export for campaign events. This document specifies the export layout, output format, output location, and custom configuration option.
Alternatively, for clients who have the ability to access data directly from Snowflake, we can expose a Read-Only Snowflake Data Share of these events with the same layout. Note that this may incur additional annual costs to maintain. For more details on Snowflake Data Sharing, please visit Snowflake's documentation.
Event Data Layout
Field | Type | Description/Logic |
---|---|---|
event_type | String | Type of the event, including the below values:
All other values of event_type that are specific per account should be delivered as they were sent. |
event_id | String | Unique identifier for this event. |
site_id | String | Site for which the event was served. |
resource_type | String | The type of resource acted upon in the event. Expected for:
|
resource_id | String | The identifier for resource acted upon in the event. Expected for:
|
event_time | String | ISO-8601 String representation of the time of the event |
recset | String | Identifier for a set of recommendations. Expected for:
|
rec_group | String | Identifier for the group in the recommendation set. Expected for:
|
rec_position | Number | Identifier for the position of the recommendation in the recommendation set. Expected for:
|
campaign_name | String | Human-readable name of the campaign. Derived from campaign name for:
Derived from "properties.campaign" for
|
campaign_id | String | A machine-readable identifier for the campaign. Only present for the following events:
|
channel | String | The campaign channel for this campaign. Possible values are:
For personalized recommendations from the ML system, use the "medium" specified for the recommendation set. Expected for:
|
campaign_tags | List | In JSON or JSONL format, the value should be an array of strings, each one representing a tag, e.g. "campaign_tags":["Tag_1", "Tag_2", "Tag_3"]. In {{CSV}} format, a delimited string representing this list is used, e.g.: "[""Tag_1"",""Tag_2"",""Tag3""]" Only present for the following events:
|
campaign_codes | Stringified JSON Object | A stringified JSON Object representing the external campaign code key:value pairs specified for this message that are not tracking codes used on liks. This may include an external campaign or segment key. Only present for the following events:
|
campaign_tracking_codes | Stringified JSON Object | A stringified JSON Object representing the "external tracking" key:value pairs specified for this message and appended to links. This may include Google Analytics or custom tracking specified in the Create Campaign flow. Only present for the following events:
|
campaign_type | String | The type of campaign (e.g. {{"broadcast", "trigger", "file_drop"}}) Only present for the following events:
|
message_uid | String | Unique identifier for the communication that is sent. Only present for the following events:
|
subject_line | String | The subject line of the actual email message sent for email channel campaign events. Expected for:
|
batch | String | The specific batch for the campaign. |
String | The email address of the user at the time of the event, if known. | |
user_id | String | The user_id or uid of the user at the time of the event, if known. |
geo_subdivision | String | The enriched subdivision (e.g. state/province) derived by Events Service for the event. |
geo_country | String | The enriched country derived by Events Service for the event. |
geo_city | String | The enriched city derived by Events Service for the event. |
geo_latitude | Float | The enriched latitude derived by Events Service for the event. |
geo_longitude | Float | The enriched longitude derived by Events Service for the event. |
user_agent | String | The user agent string from the browser of the user. |
browser_name | String | The name of the client/browser for which an email was opened or clicked, or an event was tracked. |
browser_version | String | The version of the browser for which an email was opened or clicked, or an event was tracked. |
os_name | String | The name of the operating system for which an email was opened or clicked, or an event was tracked. |
os_version | String | The version of the operating system for which an email was opened or clicked, or an event was tracked. |
device_type | String | The name of the device type for which an email was opened or clicked, or an event was tracked. |
url | String | The URL of the link clicked or the page viewed. |
original_url | String | The redirected URL if there is any. |
session | String | A session derived by Analyticstrain for the user session. p13n session_id lasts for an hour of no activity. If an user performs any activity(that results in reloading/initializing p13n on the site) within that hour, the session_id ‘s expiry will be extended by an hour. For example, |
properties | JSON Object | A stringified JSON Object representing the properties specified in the event. Derived from stringifying "properties" on all events. |
user_attributes | JSON Object | A JSON list representing the user attributes of the user at the time of the event that are configured via the user_attribute_whitelist setting. Note that this field will be empty if the user_attribute_whitelist is unset or empty. |
scoped_user_attributes | JSON Object | A JSON list representing the all the child specific/scoped attributes (across ALL children) for a parent site enabled for sub account structure. |
file | Stringified JSON Object | A stringified JSON Object representing the file columns specified in a File Drop Triggered Campaigns campaign for this message. |
version_name | String | Version name of the multi-version campaign. Only present for the following events:
|
abtest_version | String | Version name of AB test. Only present for the following events:
|
Export Output Formats
The output of the above events can be either a JSON, JSONL, or a CSV file.
For CSV files, nested objects will be added into the single column.
CSV: CSV files will be delivered with a column header indicating the fields in the event schema above.
JSON: For JSON files, all fields in the event schema noted above that are "Stringified JSON" should be instead expressed as JSON objects.
JSONL: For JSONL files, all fields in the event schema noted above that are "Stringified JSON" should be instead expressed as JSON objects. Note that each record will be delivered as its own JSON object.
Export Data File Generation
Files will be generated and dumped on a daily or hourly basis, selecting events that were processed by the Zeta Event Service within the given hour or day window.
For daily dumps, filename should be {{events_YYYYMMDD-PARTITIONNUM}}, e.g. {{events_20180120-0}}.
For hourly dumps, filename should be {{events_YYYYMMDDHH24h-PARTITIONNUM}}, e.g. {{events_2018012013h-0}}.
Export Data Output Location
FTP: Files will be placed in an FTP location, authorized for access with the customer's FTP Token, at the following locations:
Hourly Data
ftp://ftp.boomtrain.net/<site_id>/data/events/hourly/<config_id>
Hourly files are created on the 50th minute for the hour prior; i.e. for events from 9 am to 10 am, the file will be generated around 10:50 am.
Daily Data
ftp://ftp.boomtrain.net/<site_id>/data/events/daily/<config_id>
Data Retention
Both Daily and Hourly files are automatically removed from the file server after 30 days.
Additional File Format
File name and path will be the same original report, the only difference is file extension i.e., cnt
Fields present in the .cnt file mentioned below
Filed Name | Description |
---|---|
export_timestamp | Start time of hourly or daily report generation. |
export_path | File name and the location. |
num_rows | Number of rows in the record. |
start_etl_time | Start time of events included in the report, events etl_time greater than equal to will be considered in the report. |
end_etl_time | End time of events included in the report, events etl_time less than will be considered in the report. |
Sample File
// events_2019021422h.cnt
{
"export_timestamp": "2019-02-14T23:50:30+0000"
"export_path": "default/events_2019021422h.json",
"num_rows": 12212,
"start_etl_time": "2019-02-14T22:00:00+0000",
"end_etl_time": "2019-02-14T22:59:59+0000"
}