Skip to main content

Hello, 

I’m looking to build a dataset with all my campaign messages and I can’t find anywhere in the api the stats per message per campaign. 
I was trying to use GetMetricAggregate and use the dimension $message but when I do the dimension shows some campaign ids instead of a message id. 

 

Is it even possible to have the stats (open, clicks, conversions) per message per campaign ? 

 

Thank you for your help. 

Hello ​@MiljanSto, thanks for reaching out!

Yes, you can get stats per message per campaign in Klaviyo, but the API doesn’t provide direct message-level metrics. Instead, use GetCampaignMessages to retrieve message IDs, then GetMetricAggregates with filters for campaign and message. For conversions, cross-check with event data. If implementation seems complex, feel free to reach out for tailored assistance.

 

 


"Have you tried using the GetCampaignMessages endpoint to retrieve message IDs first, then filtering GetMetricAggregates by both campaign and message? Also, are you looking for real-time tracking or historical aggregation?"

 

 


Thank you for you answer and sorry I didn’t see it sooner. I managed to make it work in the end, even if I’m not totally sure about the metrics quality and consistency. 


@MiljanSto ,

"No problem at all, Miljan! Glad to hear you got it working. If you’re unsure about the metrics’ quality and consistency, I’d be happy to help validate them. Are there specific discrepancies you’ve noticed, or any areas where the data doesn’t align with expectations?"

 


Spoke too soon actually ​@MANSIR2094 , I took the dimension attributed_variation and I could get the attributed revenue per messages but not the opens, clicks, … 


"Got it, Miljan! Attributed revenue per message works with attributed_variation, but opens and clicks require different dimensions. Have you tried using GetMessage for message-level stats or filtering GetMetricAggregates by event types like Opened Email and Clicked Email? Let me know if you need help refining the query!"