few-memory-16563
08/08/2022, 10:08 PMhold
into the on
version of a feature. Do we have to include URL as an attribute in the SDK for this to work, or does growthbook read from the current page URL by default (or something else?)future-teacher-7046
few-memory-16563
08/08/2022, 10:11 PMhold
in the URL
• this is how i have the rule syntax
• when i test it by visiting one of the hold
URLs in an incognito window, then going to another page in the site that has the feature as an A/B, I'm not seeing the feature 100% of the time (which is what I'm trying to achieve)future-teacher-7046
few-memory-16563
08/09/2022, 4:27 PMfuture-teacher-7046
window.sessionStorage
Then you can force the value directly in the SDK using the setForcedFeatures method. No need to deal with rules or the GrowthBook UI for that.few-memory-16563
08/09/2022, 4:44 PMon
version of the feature, will the A/B test pick that up as a session? Or will it be ignored? (i am trying to achieve the former)future-teacher-7046
setForcedFeatures
it will ignore any rules and just immediately assign that value to the user. There is also setForcedVariations
which will use the A/B test rule and just always force the specified variation.few-memory-16563
08/09/2022, 4:55 PMsetForcedVariations
is actually what we want. Thanks for your help!future-teacher-7046
growthbook.setForcedVariations({
"my-experiment": 0
// 0= control, 1= 1st variation
})