Skip to main content
Solved

Data discrepancy between API and dashboard

  • June 29, 2023
  • 1 reply
  • 287 views

Forum|alt.badge.img+3

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: ['unique'],
        filter: [`greater-or-equal(datetime,${start_date})`, `less-than(datetime,${end_date})`],
        by: ['$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

Best answer by Brian Turcotte

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

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

1 reply

Brian Turcotte
Forum|alt.badge.img+37

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