Skip to main content
Solved

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

  • February 26, 2024
  • 1 reply
  • 97 views

Forum|alt.badge.img

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

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

carleygilmore
Klaviyo Employee
Forum|alt.badge.img+2
  • Klaviyo Employee
  • 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