Skip to content

Journal

How to run an A/B test on a website

Original French publication

An A/B test randomly assigns comparable visitors to two versions and measures a predetermined outcome. It is useful when the team has competing ideas and enough traffic to distinguish a real difference from chance.

What can you test?

Test landing page copy or layout, a main call to action, home page imagery, navigation, checkout steps, product features, an email subject, ad creative or a performance change. Choose one coherent hypothesis. If both the copy and layout change together, the test compares the packages and cannot isolate the contribution of each.

What the test can tell you

Controlled exposure can reduce guesswork and limit the cost of rolling out an untested change. Decide what success means for the particular task. A completed enquiry or checkout is usually more informative than a button click if the aim is to win customers. Also monitor outcomes that should not deteriorate.

Set up the experiment

  • 1. Define the question, hypothesis, primary metric and audience.
  • 2. Randomly allocate eligible visitors to A and B, often in equal proportions. Keep allocation consistent for repeat visits where appropriate.
  • 3. Build a control and a variant, verify the tracking and test the critical journey in both.
  • 4. Choose the planned sample, duration and decision rule before launch. Avoid stopping as soon as one line pulls ahead.
  • 5. Run both versions concurrently, check that exposure is balanced and collect comparable data.

Read the results and decide

For each group, count eligible visits and completed actions, then compare rates, the size of the difference and its uncertainty. Look for implementation errors and changes in audience mix. If the evidence is inconclusive, record that outcome. A statistician can help when volume is limited or the test design is complex.

Roll out a supported change, confirm normal operation and retain the evidence for the next test. Where traffic is too low to decide reliably, observation and user interviews may answer a design question sooner.

Further information