Skip to main content
Solved

Unable to get conversion metrics by campaign ID in query_metric_aggregates request

  • February 3, 2023
  • 4 replies
  • 333 views

Forum|alt.badge.img+4

Im using metric-aggregates request to get metrics data(https://developers.klaviyo.com/en/reference/query_metric_aggregates), I am unable to get campaign IDs for conversion metric like placed order from BigCommerce, I am getting response with empty dimensions only. But I am able to see data in the dashboard.

Help me with this.

Best answer by Brian Turcotte

Hi @santiagosanti!

 

My apologies for the delay here! I think the issue may come down to the dimension name that you are using. If you are being returned an empty dimensions response, it means that the event you are querying does not have that type of dimension in association. Although I understand that this could be disorienting, it probably just means that your Placed Order metric uses a different identifying dimension.

 

If you are using some variation of Campaign ID, you may have better luck using “Campaign Name” under the “by” attribute:

"by": [
                    "Campaign Name"

 

I hope this helps!

- Brian

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @santiagosanti!

 

Would you mind clarifying the data that you are specifying in the call, vs. the data you are hoping to receive with the call?

 

For example:

  • Are you trying to group by Campaign in the call (with the ‘by’ function), and the response is not grouped in accordance with that function? 
  • Or are you hoping to receive the Campaign ID related to each unique event data in the response of the call?

By nature, this endpoint is querying aggregates (sum, count, count of unique visitors) of event data, I don’t believe it's intended to provide the Campaign IDs related to each data point. However, if you could provide a little more context about the exact use case, it should help myself and other Community members obtain some more perspective on the issue.

 

Thanks for using the Community!

- Brian


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • February 4, 2023

Hi Brian,

I hope this message finds you well. I am trying to group conversion data by campaign ID and join the metric data with campaign data. I have all campaigns data (https://developers.klaviyo.com/en/v1-2/reference/get-campaigns), to join I need campaign ID from metric-aggregates call (https://developers.klaviyo.com/en/reference/query_metric_aggregates).

I am able to get the data grouped by campaign ID for internal metrics (Clicked Email) but facing issues while doing the same for BigCommerce Integration metrics (Placed Order). The response I am getting is empty dimensions. However, I am able to get the same metric by campaigns in custom reports.

Help me in getting the reports using the API just like I am doing in Custom Reports? I would really appreciate your support.

Thank you!


Forum|alt.badge.img+4
  • Author
  • Active Contributor II
  • 25 replies
  • February 7, 2023

Hi @Brian Turcotte ,

Just following up on the previous question and details I provided above. I'm eager to get your thoughts and insights on the issue I'm facing and would really appreciate your help.

Thanks,

Santi


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • February 21, 2023

Hi @santiagosanti!

 

My apologies for the delay here! I think the issue may come down to the dimension name that you are using. If you are being returned an empty dimensions response, it means that the event you are querying does not have that type of dimension in association. Although I understand that this could be disorienting, it probably just means that your Placed Order metric uses a different identifying dimension.

 

If you are using some variation of Campaign ID, you may have better luck using “Campaign Name” under the “by” attribute:

"by": [
                    "Campaign Name"

 

I hope this helps!

- Brian