Segmenting experiment results data via API
Hi Optimizely Forum!
I'm trying to pull my results data from optimizely experiments using the API (rather than tracking and recording numbers by hand) and I'm wondering: is there a way to segment/filter the data being pulled from the API by the different segments available (ie Search, Direct, Non-mobile, etc)?
Right now I can pull the overall data for the experiment, but can't filter it by the different segments and as far as I can tell, this isn't possible (except perhaps for duplicating the audience segments and adding them as custom audiences for the experiment).
If it's not possible with the Optimizely classic API, will it be possible with the Optimizely X API? It'd be nice to have something like a ?segment parameter for the /stats API endpoint (ie ?segment=search, ?segment=referral, etc) for all the existing default segments available in the Optimizely results page that filter the results by those different segments.
Solved! Go to Solution.
Thanks for reaching out! We've received the same request from other customers a lot over the last few years, but it has a challenge to implement segmentation for the Optimizely Classic API.
At the moment, the engineering team is working on the final pieces of the Optimizely X REST API. There will be a ton of improvements, but the first launch won't include segmentation on results (it does include time filtering).
The reason why it is not, is because we are preparing for even better functionality: boolean conditions on segments. At the moment, that is not something that is available in the UI, but it will appear soon. Once it is available in the UI, we will also expose that functionality through the API.
An example of what you will be able to do with boolean segments:
Get my results for customers that came from search AND are using an iPhone.
We expect to do the API launch soon. The work for boolean segments is also almost done for the UI, but will need some work on the API side.
I hope this helps!
Hi Lucas/Optimizely Support,
Since it's been a few months since I inititally opened this question, I just wanted to check in to see if these features were available via the API yet.