Hey everyone! I’ve got a question regarding a quer...
# announcements
q
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
Hi, that's still possible in most of the SDKs. Which language are you using?
q
I’m using JS SDK. Looks like this line makes user not in experiment, so the feature value is not set later here
f
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
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
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
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
This is now fixed in the latest SDK versions
q
yup, already tried 0.18.0 and it works great, thanks again