Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Analytics API 2.0: How to Apply Segments When Creating Calculated Metrics?

Avatar

Level 2

Hello all,

I am trying to move from the 1.4 API over to the 2.0 API.

When using the [POST] /calculatedmetrics endpoint in 2.0 to create a new calculated metric, I can't figure out how to apply a segment to my calculated metric definition.

In 1.4, I was able to define the "segments" array inside the "definition" parameter for the calculated metric. Now it seems that this is no longer the case.

I can't find anything relevant to this in the documentation, so does anyone know how to achieve this in the 2.0 Analytics API?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

never tryed myself, but I would do the following: open analytics, create a calculated metric (with segment) and save. now inspect network traffic to see the "save request", within the request you can see how to apply the segment ...

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

never tryed myself, but I would do the following: open analytics, create a calculated metric (with segment) and save. now inspect network traffic to see the "save request", within the request you can see how to apply the segment ...