You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an idea proposal for exposing a getVariationForFeature-like method (s) directly on the optimizelyClientInstance so developers can quickly figure out and directly reference the variation the user is bucketed in for a Optimizely Fullstack feature test. Currently we must use a hack of seeing whether a feature is enabled for a user (via .isFeatureEnabled()) and what feature variables we set to differentiate between multiple different feature test variants (via .getFeatureVariableBoolean or getFeatureVariableString).
Similar to how the sdk has already exposed a method we can use to grab an AB experiment's variation, there'll probably be 2 separate methods that will:
trigger/log the impression back to Optimizely and also return the variation
only return the variation (won't create an impression)
Next release if possible! We have more feature tests coming in where it would be helpful to be able to directly reference a feature test variant in code, rather than "guess" the variant with more complicated code.
@optimizely/optimizely-sdk version: 3.5.0 (pretty much all current versions)
The text was updated successfully, but these errors were encountered:
DDChiang
changed the title
Idea: Expose usable method(s) to grab the user's variation for a feature test
Expose usable method(s) to grab the user's variation for a feature test
Mar 12, 2020
How would the enhancement work?
This is an idea proposal for exposing a
getVariationForFeature
-like method (s) directly on theoptimizelyClientInstance
so developers can quickly figure out and directly reference the variation the user is bucketed in for a Optimizely Fullstack feature test. Currently we must use a hack of seeing whether a feature is enabled for a user (via.isFeatureEnabled()
) and what feature variables we set to differentiate between multiple different feature test variants (via.getFeatureVariableBoolean
orgetFeatureVariableString
).Similar to how the sdk has already exposed a method we can use to grab an AB experiment's variation, there'll probably be 2 separate methods that will:
--
Side note: I noticed in this codebase line referencing optimizelyInstance.getVariationForFeature that there already is a way to grab the feature test but it's not exposed as a method we can directly call off the Optimizely client instance.
When would the enhancement be useful?
Next release if possible! We have more feature tests coming in where it would be helpful to be able to directly reference a feature test variant in code, rather than "guess" the variant with more complicated code.
@optimizely/optimizely-sdk
version: 3.5.0 (pretty much all current versions)The text was updated successfully, but these errors were encountered: