Solved

Unable to get metrics by campaign id

  • 2 December 2022
  • 9 replies
  • 406 views

Badge +3

I’m using the latest stable API (version 2022-10-17) to get metrics info and aggregated data by flow id, So that I could join flow data with metric data, I would like to do the same for campaign data but I am able to get aggregated data by campaign name only, I am afraid there will some cases where campaign name would be same and my join would go wrong. why “by” attribute is supported for “flow id” but not for “campign id”, Is there any work around to do this?

icon

Best answer by Dov 2 December 2022, 21:37

View original

9 replies

Userlevel 7
Badge +61

Hi @santiagosanti,

Thanks for sharing this question with us.

If you haven't already seen this guide, I think you'll find it handy: How to Export Conversion Data. You would use the message_ID which corresponds to the unique campaign in the API calls.

You can also export all campaign analytics into a .csv file. The .csv file will include the message ID for all campaigns (campaign IDs), in addition to other information about your campaigns. You can aggregate the campaign data using a pivot table following the .csv export.

I hope that helps.

Badge +3

thanks @Dov, thats helpful. Having campaign id as $message confused me. I have four quick questions.
1. why “get campaigns” request is not available in latest stable API (version 2022-10-17)

2. how to get conversion data by list id

3. im using metric-aggregates request to get metrics data, I would like to know for which metrics can be requested as “sum_value” or “unique” measurement.

​​​​​​​4. will every event considered as metric

 

Userlevel 7
Badge +61

Hi @santiagosanti,

Thanks for your follow-up note.

  1. It’s on it’s way :)
  2. On events with conversions, if it was sent to a campaign there will be a $group_ids property on the $attribution property of the event. A "group" refers to a list/segment. Unfortunately, we don't have a way to group by list IDs at the moment. The best way is to extract the events and cross reference against a table of the list/segment members.
  3. Any event with a $value property can be summed. All other events support unique.
  4. Yes, these two terms are used interchangeably.

Hope that clears things up!

Badge +3

thanks for helping @Dov , 

regarding 3rd question, Is it possible to find that using metric info data?

Userlevel 7
Badge +61

Hi @santiagosanti,

Thanks for your follow-up note.

Yes, if you follow our guide here, you can click on the timestamp of any given metric and see if $value is present.

 

Badge +3

Thanks for your follow-up note.

Im using /api/metrics/ in latest stable API (version 2022-10-17) to get metrics info. Is it possible find which metric supports “sum_value” .

I have two more questions

  1. when I can expect “get campaigns”, “Get Events for a Specific Metric” requests to be available in latest stable API (version 2022-10-17).
  2. I am unable to get campaign data that is part of flow in “/v1/campaign/{$message}”, I am using the Campign ID I recieved from “/api/metric-aggregates/” as “$message” with “$flow”(Flow ID).
Userlevel 7
Badge +61

Hi @santiagosanti,

We wouldn't be able to pull search for keys in key value pairs.

  1. The beta for campaigns endpoint will be available in the coming weeks
  2. You can try using “get flow message” using our v3 endpoint as a substitute for your v1 call

I hope that helps.

Badge +3

Hey @Dov,

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.

Userlevel 7
Badge +36

Hi @santiagosanti!

 

I noticed that you started a new topic on this same issue here:

 

For the sake of organization and visibility, let’s resume the conversation in that thread. This way, other Community members with similar questions will be able to find it more easily and potentially join the conversation!

 

Best,

Brian

Reply