Optimisation

Run an A/B test

7 min read

A test is a control and one challenger. Both are published as real files rather than one page rewritten in the browser, so there is no flicker and no test script deciding what to show after the page has painted.

Create the challenger

  1. Open the page and create a challenger — either duplicate the control and edit it, or let the planner suggest an alternative headline.
  2. Change one thing that matters. A challenger that differs in five places tells you nothing about which change moved the number.
  3. Set the traffic weight. Start at 50/50 unless you have a reason not to.
  4. Publish. The control renders to index.html and the challenger to variant-b.html, each baking in its own variant id.

How traffic splits

  • The edge Worker reads ab.json for the weight and assigns each visitor a variant
  • The split is sticky, so a returning visitor keeps seeing the same version
  • Views and leads both carry the variant id, so conversion is per-variant rather than blended

Read the result

The analytics overview compares variants side by side on visits, leads and conversion rate. Wait for the difference to hold rather than calling it on the first good day — early leads are noisy, and a test called at twenty conversions usually reverses.

Promote the winner

Promoting the challenger flips the page's current version, so the winner becomes the control. The next challenger tests against it, and the loop starts again.