To retrieve currently active experiments using JavaScript in the browser console, you can use the Statsig.getExperiment
or Statsig.getLayer
methods. However, these methods require you to know the name of the experiment or layer. There is no documented method to retrieve all active experiments without knowing their names.
For group overrides, there is no documented method to retrieve group IDs directly. However, you can use the Statsig.overrideConfig
method to override the value of a specific experiment for a specific user. Note that this override only applies locally and will not persist across sessions. Here is an example:
Statsig.overrideConfig("a_config_or_experiment_name", { key: "value" }, "a_user_id");
In this case, { key: "value" }
should match the structure of the parameters for the experiment you're trying to override. There is no way to override groups directly using the name or ID of a group.