Analysis
Choosing a winner
When to call a test, how to complete it and how to roll out the winning version.
Before you call it#
- You reached the sample size you planned (see Reading results).
- The test ran for at least one full week.
- The visitor split between variations roughly matches your weights. A big mismatch usually means a bug in your snippet.
- Results for Production only (
GET /api/experiments/{id}/results?environment=prod) agree with the dashboard, which combines all environments.
Complete the experiment#
Choose Complete on the experiment page. Completing is final: no new visitors are assigned, the SDK returns assigned: false to everyone, and the experiment becomes read only. Results stay available.
Completing does not ship the winner
After you complete, every visitor sees whatever your page shows by default, which is usually the control. To keep the winning version, change your site.
Roll out the winner#
- 1
Make the change permanent
Update your page so the winning version is the default content.
- 2
Remove the experiment code
Delete the
ABTest.runcallback for this experiment. Keepsdk.jsandinitif other experiments use them. - 3
Record what you learned
Write the outcome in the experiment description, so the next test builds on it.
A gradual rollout today#
There are no feature flags yet. If you want to keep showing the winner through the SDK for a while, leave the experiment running and keep the winning code in your callback, but remember the control share still sees the old version. Weights cannot be changed after creation, so you cannot move a running test to 100%.
Coming later
A one-click "ship winner" flow is planned.
When the control wins#
Complete the experiment, remove the variant code and keep your page as it is. A losing variant is a result too: you avoided shipping a change that would have hurt.