Skip to main content
Question

Klaviyo API - Campaign Message Stats


Forum|alt.badge.img

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. 

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

6 replies

MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 7, 2025

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.

 

 


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 7, 2025

"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?"

 

 


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • February 11, 2025

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. 


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 11, 2025

@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?"

 


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • February 11, 2025

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, … 


MANSIR2094
Problem Solver IV
Forum|alt.badge.img+13
  • Problem Solver IV
  • 174 replies
  • February 11, 2025

"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!"