statsig-sidecar-v2-beta 2.4.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,16 @@
1
1
  # Statsig Sidecar
2
2
 
3
- Statsig sidecar helps marketing teams build and run experiments without needing to write or modify code.# sidecar-js-v2
3
+ Statsig sidecar helps marketing teams build and run experiments without needing to write or modify code.
4
+
5
+ You can register a pre-init experiment callback through `window.statsigSidecarConfig`:
6
+
7
+ ```js
8
+ window.statsigSidecarConfig = {
9
+ onExperimentEvaluation: function (event) {
10
+ // event.name === "experiment_evaluation"
11
+ // event.experiment is the Statsig experiment instance
12
+ },
13
+ };
14
+ ```
15
+
16
+ Unlike `window.postExperimentCallback`, `onExperimentEvaluation` fires once per Sidecar experiment evaluation, including experiments activated later through prerun scripts via `StatsigSidecar.activateExperiment(...)`.