https://www.growthbook.io/ logo
#announcements
Title
# announcements
q

quaint-alligator-93321

05/23/2022, 1:13 PM
Hey everyone! I’ve got a question regarding a query string override for experiments. Previously GrowthBook supported forcing experiment variation via query string. The code is still there, but user is set as not in experiment when query string is present, so this does not influence feature value. My question is - is this an expected behaviour or a bug? I know about
setForcedFeatures
method, but I’m also interested in experiment forcing and not just a feature.
f

future-teacher-7046

05/23/2022, 1:14 PM
Hi, that's still possible in most of the SDKs. Which language are you using?
q

quaint-alligator-93321

05/23/2022, 1:16 PM
I’m using JS SDK. Looks like this line makes user not in experiment, so the feature value is not set later here
f

future-teacher-7046

05/23/2022, 1:20 PM
I see. We are using
inExperiment
for two separate purposes. One to disable tracking when a variation is forced. And another to determine if a feature rule should be skipped or not.
Sounds like we may need to split that into two separate flags,
inExperiment
and
shouldTrack
.
q

quaint-alligator-93321

05/23/2022, 1:30 PM
Looks like tracking happens later inside the
_run
method if there was no early return from this method. So a special flag may not be needed to find if we should track, but may be needed if we need to know if we have tracked. I’m just thinking what would happen if we just set
inExperiment = true
when doing query string override. Would it break something?
f

future-teacher-7046

05/23/2022, 1:36 PM
I'll have to think about that. It might work
👍 1
I think this could work. It's still useful to differentiate between random assignment vs forcing, but we can just add a new field to the experiment return value called
hashUsed
for that.
q

quaint-alligator-93321

05/23/2022, 4:49 PM
That was blazingly fast! Can’t wait for it to be released. Thanks a lot for the GrowthBook in general and this PR in particular.
f

future-teacher-7046

05/24/2022, 3:34 PM
This is now fixed in the latest SDK versions
q

quaint-alligator-93321

05/24/2022, 3:36 PM
yup, already tried 0.18.0 and it works great, thanks again
31 Views