Skip to main content
Solved

Events API does not always return Unique Campaign ID for Campaign Related Events

  • February 26, 2024
  • 1 reply
  • 151 views

Forum|alt.badge.img+1

I am using the events API to query for events like “Opened Email”, “Received Email”, “Clicked Email”, “Received SMS” and “Clicked SMS” - all Campaign related events. 

For the email related events, there is a field included in the event_properties called `$message` that appears to be the unique campaign ID. However, it is not included in the Received Email Event response. The response does include `Campaign Name`, but that is not unique and can be used by many different campaigns. 

The SMS related events all appear to have this unique ID returned, although the property is the `event_properties.extra.Message ID` field. 

Can we have $message included on the “Received Email” event type? Otherwise, it makes it impossible to identify the unique campaign ID. 

Here is a sample response of the event_properties included on a Received Email event: 

 

{
"event_properties": {
"Campaign Name": "Internal Klaviyo - Test Campaign Name",
"Email Domain": "klaviyo-demo.com",
"Subject": "Internal Klaviyo - Subject Line",
"_ip": "166.137.246.54",
"$event_id": "sample_data_gen:955ff28c-0de4-41b0-8205-9e9ed291ea92"
}
}

 

Best answer by carleygilmore

Hi @efly5!

Thanks for providing an example response. This is a shortcoming with our sample data generation tool, as our sample events (with event ID prefix sample_data_gen) don’t currently return the $message field. We are looking to address this in the future. I hope this helps!

Best,

 

Carley

1 reply

carleygilmore
Community Manager
Forum|alt.badge.img+3
  • Community Manager
  • 6 replies
  • Answer
  • February 27, 2024

Hi @efly5!

Thanks for providing an example response. This is a shortcoming with our sample data generation tool, as our sample events (with event ID prefix sample_data_gen) don’t currently return the $message field. We are looking to address this in the future. I hope this helps!

Best,

 

Carley