A marble game that runs a real A/B test on Flagsmith.
Flagsmith picks which end screen each player sees. We count who plays again, then ship the winner.
Why gatefall
The problem
Teams change UI on gut feel.
What gatefall shows
The whole experiment loop, live, on real Flagsmith calls.
Why it matters
Decide with data, then ship the winner with one call.
How it works
The flag
One flag, end_screen, holds two end screens: a plain scorecard, or a replay of the marble you almost saved.
In Flagsmith getExperimentFlag("end_screen") // → "scorecard" control // → "near_miss" variantRead once, at the first end screen. That read records the exposure.
The metric
Pressing Play again sends a replay event. That is what we measure.
In Flagsmith trackEvent("replay")Primary metric: replay, counted once per player.
The split
Flagsmith sends half of players to each screen and counts replays in each group.
In Flagsmith GET experiments/{id}/results/ // scorecard 50% · near_miss 50%Replay rate per group, with the chance that the variant wins.
The ship
When one screen clearly wins, one call rolls it out to everyone.
In Flagsmith POST experiments/{id}/complete/ {"rollout_decision":"variant"}Everyone then gets "near_miss" from the same flag.
Two end screens. Each player sees one.
Score 280
28 sorted · 4 lost · best streak 11
Score 280
28 sorted · 4 lost · best streak 11
Late by 0.14 s at gate B
Example run. The bet: seeing how close you came makes you play again.
Live results
–
players in the test
–
played again after the scorecard
–
played again after the near miss
What Flagsmith controls
| On this site | In Flagsmith | Status |
|---|---|---|
| Which end screen a player sees | end_screen flag | Live |
| Replay, run and share counts | 4 events | Live |
| Shipping the winner | complete API | Live |
| Show or hide the demo | demo_mode flag | On |
| Top-of-page notice | site_banner flag | Off |
| Demo marble speed | demo_speed flag | On: 1× |
The machine room
Every marble here is a real player.