A/B Lab

Live

Your assignments, and why

Decided on the server for this request and streamed into the static page. Force a variant or become a new visitor, and watch the trace change.

Tour

Eight things to try

Each card says what to do, what you should see and why it matters. Cards tick themselves off when the matching event shows up in the Event log (top right).

0 of 5 ticked off automatically from the event log
  1. Scenario 1

    Same visitor, same variant

    Do
    Reload the page a few times.
    You see
    Your ID and every variant stay the same.
    Why
    The variant is hash(experiment + ID) % 100. Nothing to store, and the server knows the variant before it renders, so nothing flickers.
  2. Scenario 2

    New visitor, new buckets

    Do
    Click New visitor in the "You" card a few times.
    You see
    A new ID each time. Sometimes checkout-cta turns Not tracked.
    Why
    checkout-cta runs on 50% of visitors. Rollout and variant use two separate hashes, so raising the rollout never moves people between groups.
  3. Scenario 3

    QA can force a variant

    Do
    Use "Force a variant" on an experiment card.
    You see
    The Override badge appears and the decision trace stops at step 1.
    Why
    ?exp=key:variant is kept in a session cookie. Exposures carry isOverride: true, so analysis can drop them.
  4. Scenario 4

    Logged only when seen

    Do
    Open Checkout. Wait a moment, then scroll down to the Pay button.
    You see
    The tracker fills up. At 50% visible it logs exactly one exposure.
    Why
    Logging at assignment would count people who never saw the button, which dilutes the measured effect.
  5. Scenario 5

    One exposure per session

    Do
    Reload Checkout and scroll down again.
    You see
    "Already logged this session". Nothing is sent.
    Why
    Repeated exposures from the same person would inflate the counts.
  6. Scenario 6

    A static page per variant

    Do
    Open Pricing and switch layouts.
    You see
    The URL stays /pricing while the layout changes, and the plans glide into place.
    Why
    proxy.ts rewrites /pricing to a prebuilt /pricing/<variant>, so a CDN can cache every variant.
  7. Scenario 7

    Bots never count

    Do
    Run this in a terminal while the dev server is running:
    You see
    data-tracked="false". Bots always get control and log nothing.
    Why
    Crawlers and uptime checks are not users. Counting them would skew the split.
    curl -sA Googlebot localhost:3000/checkout | grep -o 'data-tracked="[a-z]*"'
  8. Scenario 8

    Catch a broken split (SRM)

    Do
    Run the traffic simulator below, then turn on "Inject a bug".
    You see
    The split matches the weights. With the bug, the SRM check turns red.
    Why
    When the observed split differs from the configured one, users are being lost or misassigned and the results cannot be trusted.

Proof

Does the split hold at scale?

Bucketing is a pure function, so the browser can run it for thousands of fake visitors in milliseconds.

Traffic simulator
Runs the real decide() for fake visitors in your browser and checks the split with a chi-square test, the same Sample Ratio Mismatch (SRM) check analytics teams run before trusting a result.
checkout-ctaHealthy split · p = 0.920

10,036 of 20,000 visitors logged an exposure (50.2%, rollout 50%).

  • control
    50% · 5,023 (want 50%)
  • green
    50% · 5,013 (want 50%)
pricing-layoutHealthy split · p = 0.468

20,000 of 20,000 visitors logged an exposure (100%, rollout 100%).

  • control
    34.2% · 6,841 (want 34%)
  • table
    32.6% · 6,518 (want 33%)
  • cards
    33.2% · 6,641 (want 33%)

The dark tick is the expected share from the weights. A mismatch is flagged when p < 0.001.