A batch in mParticle will contain different timestamps. Understanding the difference between the batch and event timestamp will help you be able to determine when events are logged via APIs or SDKs and when they are received by mParticle.
Thetimestamp_unixtime_ms
represents the timestamp of event. The current server time will be used if not specified.
Outbound JSON will include an event_start_unixtime_ms
field. In almost all cases this will be the same as the main event timestamp_unixtime_ms
field.
See the following example
{
"data" :
{
"event_name" : "click",
"custom_event_type" : "navigation",
"event_id" : 6004677780660780000,
"source_message_id" : "e8335d31-2031-4bff-afec-17ffc1784697",
"session_id" : 4957918240501247982,
"session_uuid" : "91b86d0c-86cb-4124-a8b2-edee107de454",
"timestamp_unixtime_ms" : 1402521613976,
"location" : {},
"device_current_state" : {},
"custom_attributes": {
"button_name": "home",
"other_attribute": "xyz"
}
},
"event_type" : "custom_event"
}
Batch Timestamp
mParticle adds a top-level batch timestamp — timestamp_unixtime_ms
— representing the time the batch was received by mParticle. This field is created by mParticle and should not be set manually when sending data via the Events API.
NOTE: the SDK sets the batch time to the time the batch was originally created. This relies on the current device date. If you see forwarded data with an old date, please check if the device date is properly set.
The following is demonstrates where the top-level batch timestamp will appear on an mParticle batch.
"mp_deviceid": "99999999-9ffff-f999-9f99-99ed9900099",
"attribution_info": null,
"timestamp_unixtime_ms": 1657934165102,
"batch_id": 883843828482422443,
"mpid": -88488484884842442,
For additional details, see our JSON reference in our docs.