Skip to main content

Hi, i’m using the latest stable version of Klaviyo API to fetch number of opened emails, here’s the API request config

{
method: 'POST',
baseURL: 'https://a.klaviyo.com/api/metric-aggregates/',
headers: {
accept: 'application/json',
Authorization: `Klaviyo-API-Key ${apiKey}`,
revision: '2023-06-15',
'content-type': 'application/json',
},
data: JSON.stringify({
data: {
type: 'metric-aggregate',
attributes: {
measurements: t'unique'],
filter: e`greater-or-equal(datetime,${start_date})`, `less-than(datetime,${end_date})`],
by: b'$message'],
metric_id: metric_id,
interval: 'month',
},
},
}),
};

i then sum the values based on campaign, but the data is not accurate when compared to the dashboard, in the dashboard no. of opened emails is higher than what i get from the API

Is this a bug or is there any explanation for these discrepancies? same is happening with other metrics as well like ‘Clicked Email’, ‘Active on Site’, etc

Hi @airboxr!

These discrepancies are due to the fact that dashboards in the UI are customizable and therefore sometimes use different attribution processes. This is definitely on our product team’s radar, and they’re considering ways to identify and match in-app dashboards - so if anything changes in the future, I will update the thread. In the meantime, here are some helpful resources and Community threads that might provide some more context/explanation:

 

Thanks for using the Community!

- Brian


Reply