Skip to content

v4.4.0 - Add support for "sticky" experiments

Compare
Choose a tag to compare
@tore-statsig tore-statsig released this 19 Oct 22:09
· 559 commits to main since this release
88dad64

Adds the option to specify an experiment to be "sticky", i.e. once a user is in an experiment, they won't leave the experiment and their group will stay the same on the device until the experiment is concluded. It can be enabled with the new optional keepDeviceValue parameter:

const myExp = statsig.getExperiment('my_experiment', true); // 2nd param is the new param

Also patches an issue where cached flag/config values were not used because callers were forced to wait for initialize() to resolve before checking gates/configs/experiments