Integrating with ASP.NET MVC
Hi, I'm new to Optimizely and am trying to return a different view from my ASP.NET MVC controller based on the variation. I think I've figured out a solution, but it's (a) difficult to maintain and (b) difficult to test.
Basically I plan to:
-read the optimizelyBuckets cookie
-parse the JSON
-retrieve the property matching my experiment ID (from the diagnostic report)
-compare that against the variation IDs (from the diagnostic report)
-return a different view based on the variation
Is there a cleaner way? Thank you!
Solved! Go to Solution.
I think you've pretty much got the idea of what you need to do. One thing that might help you build this in a more scaleable way, would be to use Optimizely's REST API (http://developers.optimizely.com/rest/) so you can pull down the list of experiment and variation IDs (or names).
Hope that helps, let me know if you run into any issues!
I'm not seeing what I need in the REST API.
Is this even possible through REST?
Hope that helps,