Skip to main content

I have a custom report that export my all time campaign metric data. I get this through the Klaviyo custom report UI. However, I want to be able to fully automate that export through the API and python SDK. I have been able to export the campaigns through the python SDK using the get_campaigns function, and I have been able to export unique opens and total received emails using the instructions from how to export conversion data. However, my unique opens is slightly different and I can’t seem to get it to match the custom report perfectly. Is there any reason for this? My parameters for the metric_export are, metric_id, count=100, unit=”week” start_date and end_date set, measurement = unique (count for received email metric), and by=”Campaign Name” or “$variation.” 

 

Anything I should try? Thanks for any help.

Hello @MoneyJ2k,

Welcome to the Klaviyo Community and great question!

Unfortunately, data exported through custom reports and the API won’t match up 1:1. This has to do with the fact that the exported data uses send cohort (tying all unique, by profile, opens and clicks back to the send date of the message) calculation and are all-time intervals.

Our API on the other hand only use daily/weekly/monthly aggregation and does not use send cohort calculation. This means that the data is not attributed to the message the way they normally are with the data in our customer reports.

I hope this helps clarify some things!

David


@David To Thanks for the response! That is very unfortunate. I do freelance data analytics and BI for Klaviyo agencies and they won’t accept the output of the API as it can change metrics significantly. Is there hope that one day this won’t be the case? Is there any other way to automate the custom report? There is no other work around?


Hey @MoneyJ2k,

I’m not aware of any changes being discussed on adjusting how our API returns this data. This partially has to do with how the API will return the raw data versus how attribution (send cohort) calculation method is applied through the custom reports. 

At this time there isn’t a method to automate the custom reports outside of having it scheduled. I’ll certainly share this feedback with our Product Team for their consideration.

David


I appreciate the response again. It just seems like the metrics API is basically useless if the metrics aren’t accurate. please share the feedback and if any update comes I’d love to hear about it. Thanks!


I am also facing a similar problem where a customer wants to export through the API the same data they see in the UI, and it is disheartening that this cannot be done… Plus it seems quite complicated to use multiple API calls and combine the resulting data to generate a list that the customer generates in the UI with just a few clicks. 


Hey @IrinaK,

Thanks for sharing that feedback. I’ll certainly route your sentiment upwards for our Product Team to explore!

Appreciate you taking the time to share your thoughts and for being a part of the Klaviyo Community,

David


This is also a big issue for us - we need to be able to automate our daily metrics reporting and the custom reports within Klaviyo are limited.  I need to be able to export *correct* data from the metrics API so that I can programmatically get the data that we need daily in our own reporting formats.


I’ve actually built up a solution for our agency and others recently. Klaviyo also has released some new endpoints that can help you. If you’d like shoot me an email jaredreinke@gmail.com and we can talk through it. I’ve built up a bunch of custom reports in PowerBI, Klaviyo doesn’t make this easy but it is possible. 

 

@ddr_marketing 


@MoneyJ2k 

If you are using the Send Message Cohort, do you convert the UTC timestamp in the timezone of the profile/person or do you use the timezone of your location when comparing to the dashboard?  I am getting very accurate, if not exact values for revenue, but the recipients and clicks have been challenging to match exactly.  I am splitting the message cohort value (example: 1731126581:SiNmXz) and converting the timestamp using the profile (person) timezone and using this as my date in Power BI.  

p.s. I am only using message cohort for Flows. Campaigns match without the cohort --- at least so far in my experience. 

Any help is appreciated. 

Mark


Reply