Skip to main content

I’m trying to replicate the UI dashboard. I understand it may not match perfectly, but results that are close to what’s shown in the UI are acceptable. I’m using metric-aggregates, and here’s the body of my request:

{
"data": {
"type": "metric-aggregate",
"attributes": {
"measurements": [
"unique",
"sum_value",
"count"
],
"filter": [
"greater-or-equal(datetime,2025-08-01)",
"less-than(datetime,2025-08-31)",
"not(equals($attributed_message,\"\"))"


],
"by": [
"$attributed_message"
],
"interval": "day",
"metric_id": "placed order",
"page_size": 500
}
}
}

For this example, I used the placed order metric ID.

I want to replicate this screenshot 

 

Hey ​@ronen tak 

The metric-aggregateAPI endpoint that you are using that is causing you to see a difference, and it becomes a choice as to whether you do want to replicate the UI or tell a different reporting story with what you’re building outside of the platform.

In the dashboard you're trying to replicate, attributed revenue is grouped by the send date of the campaign or flow message, and not when the order took place.

So even if someone receives an email on August 1st, clicks it, and orders on August 4th, the revenue still gets attributed to that August 1st send.

But in your current metric-aggregate request, you're filtering by order datetime, not message send datetime.

If you want to replicate the frontend reporting, take a look at the reporting API endpoint - https://developers.klaviyo.com/en/reference/reporting_api_overview

Thanks,

Ross