# How to Do a B Testing: A Step-by-Step Guide for 2026

_2026-11-23_

You've got a product page open, a delivery line you want to change, and a colleague asking whether the new version is "winning" after two days. The green arrow on the dashboard feels decisive. It usually isn't. If you're trying to work out how to do A/B testing without shipping a fluke, the job is narrower than most dashboards suggest: one change, one clean split, and a money outcome you agreed before anyone looked at the chart.

## What an A/B Test Is and When to Run One

Say a UK homeware store wants more orders from its bestselling cushion page. Half of new visitors keep seeing the current page, the **control**. The other half see the same page with one addition, a banner that reads **Free delivery over £40**. That second page is the **variant**. Assignment is random, close to **50/50**, and the store compares one outcome, such as completed purchases or **revenue per visitor**.

That single change is the whole point. If orders move, you can trace the gap to the banner. A full redesign of photos, price and copy at once can lift sales and still leave you guessing which piece did the work. You'd then repeat the bundle forever, including the parts that did nothing.

A test is worth running when three things line up. The page already affects revenue, the change is large enough that a shopper would notice it, and you can reach a planned sample within a few weeks. Poor fits are just as clear. A low-traffic gift guide will not fill a sample before the range changes. A replatform mid-test breaks the comparison because the page itself is moving. A bank-holiday sale will inflate both versions and make a weak banner look clever.

### Go or no go in five minutes

Answer these before you build anything:

- **Traffic:** Can this URL supply enough eligible visitors for both versions inside a few weeks, based on the last month rather than a peak week?
- **Change size:** Is the difference obvious, such as a delivery promise, a price frame or a checkout step, rather than a shade of grey on a button?
- **Page value:** Does this page sit on the path to a purchase, so a real lift would show up in orders or revenue per visitor?
- **Calendar:** Is the next fortnight free of a sale, a site move or a header change that would hit both versions unequally?

Four yeses means you have a test. Any no means you wait, pick a busier page, or make a bolder change.

## How Much Traffic a Test Needs

Three inputs set the visitor count: your **baseline conversion rate**, the **smallest relative lift** worth detecting, and the confidence level. The table below is a two-sided test at **95% confidence** and **80% power**. Read the visitor column before you fall in love with a small lift. A quiet page cannot see a small change.

| Baseline conversion rate | Relative lift to detect | Visitors needed per variant |
| --- | --- | --- |
| 2% | 10% | 80,600 |
| 2% | 20% | 21,100 |
| 5% | 10% | 31,200 |
| 5% | 20% | 8,200 |
| 10% | 10% | 14,700 |
| 10% | 20% | 3,840 |
| 58% | 10% | 1,100 |

The last row is a useful reference, not a target for every page. The average UK ecommerce checkout converted **58%** of shoppers who reached checkout in 2024, based on research by [IMRG and Ecommpay](https://www.comparecardfees.co.uk/insights/payment-gateways/uk-ecommerce-payment-statistics/). At that rate, about **1,100** eligible visitors per variant can detect a 10% relative lift. A homepage converting at **2%** needs about **80,600** per variant for the same relative lift. Same ambition, wildly different calendar.

### Turn the count into days

Take a product or landing step with a **10%** baseline. The table says about **14,700** eligible visitors per variant to spot a 10% relative lift. If that step gets **500** eligible visitors per variant a day, 14,700 divided by 500 is about **30 days**. A checkout already near the 58% benchmark can hit roughly 1,100 visitors per variant in a few days if traffic is steady. That is why the reference point changes which page you test first. Busy, high-converting steps finish. Sparse pages sit in limbo.

Still cover at least **two full weeks**, even when the arithmetic says you could stop sooner. Weekday buyers and weekend browsers are not the same people, and a test that only sees Monday to Wednesday will flatter whichever version suits office-hours traffic.

Before you launch, put your own baseline, the lift you care about, and daily eligible traffic into a [sample size calculator](https://www.otterab.com/free-tools/sample-size-calculator). We recommend that check before any test goes live, so you find out the run is impossible while the idea is still a sentence, not after three weeks of a half-read result.

> **Practical rule:** If the calculator says eight weeks and your next promotion is in three, do not start. Change the page you test, or test a larger difference.

## Choosing a Metric That Pays, Not Just Clicks

The free-delivery banner might lift orders because shoppers add a cheap extra to clear £40, or because they buy a cushion and skip the lamp they would otherwise have added. If orders rise **8%** while **average order value** falls **12%**, revenue per visitor goes down. A chart that counts orders alone could make a change look like a winner when it brings in less money.

![A hand-drawn illustration showing a balance scale weighing increased orders against decreased average order value.](https://cdnimg.co/3716ee4f-bd1a-44a8-ac85-c2df5af21725/15e5d83e-6731-4809-9bfc-43bd22146e90/how-to-do-a-b-testing-business-analytics.jpg)

That trade-off matters in UK ecommerce, where a higher-converting variant can also bring lower-quality orders, more refunds, or less revenue per visitor. [DHL's UK ecommerce country report](https://www.dhl.com/content/dam/dhl/local/global/dhl-ecommerce/documents/pdf/g0-ecs-insights-country-report-uk-2025.pdf) found that **69%** of UK shoppers reported returning an online purchase, and **91%** of those returners sent back up to **30%** of their purchases. A headline that attracts bargain hunters can look successful at checkout, then prove costly when parcels come back.

### The stack you actually report

Choose one **primary decision metric**, usually **revenue per visitor**. Report supporting measures alongside it for every variant, so a promising result cannot hide a weaker basket. In a split test, track **conversion rate**, **average order value** and **revenue per visitor** side by side, as well as purchases and revenue for each variant. Revenue comparisons use **Welch's t-test**, which accounts for the variation in order values. A two-proportion test suits a yes-or-no conversion outcome, not pounds per visitor.

Keep guardrails beside the primary metric: **refund rate**, margin if available, and a fulfilment check such as cancellations. Ship a variant when it raises revenue per visitor without worsening those guardrails. More clicks or orders alone are not enough. For a fuller explanation of how to choose and interpret measures, see this guide to [A/B testing metrics](https://www.otterab.com/blog/ab-testing-metrics).

### Segments you lock before launch

Decide which slices to examine before the test begins. Useful comparisons include:

- **New versus returning visitors:** Returning buyers already know the brand, so a delivery banner may affect them differently from first-time visitors.
- **Device:** A promise that wraps onto three lines on a phone may perform differently from the same promise on desktop.
- **Acquisition source:** Paid social and branded search can bring visitors with different intent. Combining them may hide a loss in one group.
- **Order value:** A banner may help small baskets and hurt large ones, which changes the overall revenue-per-visitor result.

Searching for a winning slice after the test ends invites cherry-picking. If a segment was not part of the plan, treat its result as a clue for a future test, not as proof.

Some outcomes arrive after the visit. Refunds and repeat orders can change the commercial value of a result, so schedule a revenue review at the end of the test and another once most of the return window has passed. A short-term lift can disappear when returns are counted.

> Judge the result by revenue per visitor and downstream refunds, not conversion rate alone.

## How to Set Up and Run Your First Test

Build the test in one sitting, with the stop rule written down before the first visitor is assigned. The flow below is the shape of that sitting. The numbered steps under it are what you click through, including the slips that ruin an otherwise tidy plan.

![A five-step infographic showing the process for setting up and running an A/B test for websites.](https://cdnimg.co/3716ee4f-bd1a-44a8-ac85-c2df5af21725/f50f9e0e-0985-4ce7-9ee2-cd18aca16599/how-to-do-a-b-testing-testing-process.jpg)

1. **Write a hypothesis tied to a reason.** "Changing 'Delivery 3-5 days' to 'Order by 2pm for Thursday delivery' will lift checkout completion by 10% because shoppers abandon when the delivery date is unclear." The reason stops you testing a random colour. The usual slip is a hypothesis with no mechanism, which leaves you with a winner you cannot explain or repeat.

2. **Name the test and set the exact target URL, including the URL match type.** The name should say the page and the change, such as "Checkout delivery promise". The match type keeps the test off similar URLs you did not mean to include. The slip is a loose match that also rewrites the basket page.

3. **Define the control and one variant at a 50/50 weight.** One challenger keeps the comparison readable. Changing the split after launch rewrites who is in each group, including returning visitors, and the result stops meaning what you think it means.

4. **Add the change with DOM edits or the visual editor, then preview on mobile and desktop.** You are checking the actual shop, not a mock. In our setup you name the test, set the target URL, define the variants, add the DOM changes and set the conversion goals before anything is public. The slip is launching a variant that overlaps the add-to-basket button on a phone.

5. **Set the primary goal and at least two guardrails.** Purchases or checkout completion can be the goal you watch, but refund rate and average order value have to be in the plan too. For a visual or split-URL test, set revenue or purchases as the primary goal and preview each variant on the store before launch. The slip is tracking a button click and calling that a sale.

6. **Check the installation on day one.** The snippet loads on every page in the test, both versions render without a flash of the old content, and the split is close to 50/50 after the first day of real traffic. A wild imbalance is a tracking fault, not an early winner.

7. **Set the stop rule before launch.** That is an end date covering at least two full weeks, plus the sample target from your calculator. Write it in the test notes. The slip is "we'll just watch it", which becomes a stop the first afternoon the line turns green.

### What to watch in the first 24 hours

Open both versions yourself on the devices your buyers use. Place a small order if the goal is purchases, and confirm the revenue lands on the variant you saw. If the control is collecting almost all the traffic, stop and fix the trigger before you burn a week of visitors.

A short walk-through of naming the test, setting the page and reading a first result is here:

<iframe width="100%" style="aspect-ratio: 16 / 9;" src="https://www.youtube.com/embed/TptSwMDuY74" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Leave the live test alone after that check. Do not edit the copy, do not "nudge" the split toward the version you prefer, and do not add a second change because a stakeholder asked. Those edits create a third, unnamed experiment inside the one you planned.

## Running More Than One Test Without Spoiling the Result

Every test needs its own clean pool of visitors. Two tests on the same product page, or a site-wide delivery banner running beside a checkout test, put the same people into overlapping variants. You then cannot tell whether checkout moved because of the trust badge or because the banner changed the offer before they arrived. Both readouts become noise.

The working rule is simple. **One test per page or traffic pool at a time**, queued by expected revenue. Any site-wide change, including the header, a delivery banner or a consent banner, pauses page-level tests for as long as it runs. Manual split tests use the weights you set for each new visitor. If a second test starts assigning those same visitors, the weights no longer describe a single experiment.

### Extra variants raise the fluke rate

An **A/B/n** test with three variants is two comparisons against the control, not one. Each comparison gets its own chance of looking real by accident, so the overall risk sits higher than a single pre-set bar. You have two honest options. Test one challenger at a time, or raise the bar for multiple comparisons. For A/B/n tests we adjust that threshold automatically with a **Bonferroni correction**, so a three-way test is not judged as if it were a single coin flip.

### A queue you can actually run

A homeware store might order the work like this: delivery-message test first, product-gallery change second, checkout trust badges third. Launch one, leave it for about three weeks so it can reach its sample, then start the next. The gap is the point. Overlap feels faster and produces two results you cannot defend.

Keep a test log with six fields: hypothesis, primary metric, start date, end date, result, and what you shipped. The second test should use that log. If the delivery promise won on revenue per visitor, the gallery test keeps that promise in both versions. You are not re-testing it by accident, and you are not repeating a loser because nobody wrote it down.

## Reading Results and Declaring a Winner

The test compares two groups that were assigned independently, and it asks whether the gap you see is unlikely to be random variation. That is the whole statistical claim. It is not a verdict that the variant will win next month, and it is not a reason to stop on Tuesday because the line crossed a threshold on Monday.

**Peeking** is the usual way teams throw that claim away. You open the dashboard daily, and the first time it says "significant" you ship. Each extra look is another chance to catch a random spike. Repeated peeking inflates false positives. Set the end date or the sample target before exposure starts, and read the test then.

UK demand moves even inside a short test, which is why a disciplined stop matters. [Office for National Statistics retail sales figures](https://cy.ons.gov.uk/businessindustryandtrade/retailindustry/bulletins/retailsales/may2024) show online spending in Great Britain rose **5.4%** month on month in May 2024 and **4.1%** year on year, while online sales were **27.2%** of total retail sales that month, up from **26.7%** in April. A test that straddles a jump like that can credit the variant for demand that arrived from outside the design. Calculate conversions as conversions divided by eligible visitors, compare them properly, drop duplicate or clearly invalid traffic the same way for both versions, and report the **confidence interval** and the **estimated uplift**, not a bare yes or no.

Do the setup in that order: baseline, smallest improvement you care about, a significance threshold (commonly **95% confidence**, a **5%** significance level), and the sample size before the first visitor. When you read the end result, also check device, traffic source and time period. A win that exists only on one afternoon is not a win.

### What to do with each result

On our results pages, an executive summary card states in one line whether to **ship**, **keep testing** or **stop**, and an experiment health checklist flags whether the numbers can be trusted, including a traffic imbalance between variants. Use the card as a prompt, then map the row yourself.

| Result at planned end | Confidence and lift | Guardrails | Action |
| --- | --- | --- | --- |
| Clear winner | 95%+ confidence, lift positive, interval above zero | Revenue per visitor up, refunds flat | Ship the variant |
| Conversion-only winner | 95%+ confidence, conversion up, revenue flat or down | Average order value or refunds worse | Keep testing or redesign the offer |
| Flat result | Confidence below 95%, interval spans zero | Nothing degraded | Stop, record the learning, move to the next idea |
| Loser | 95%+ confidence, lift negative | Any | Keep the control |
| Not ready | Sample target not yet reached, interval still wide | Guardrail gap wider than the effect | Keep running to the planned end |
| Unreliable | Any confidence reported | Traffic split off 50/50 or consent drop-off uneven | Fix tracking, then rerun |

The two rows people argue about are the conversion-only winner and the flat result. A conversion-only winner has a real increase in orders and a worse basket or a worse refund picture. Shipping it buys activity and loses money. Redesign the offer, or run a follow-up that aims at revenue per visitor directly. A flat result, with the interval crossing zero and nothing damaged, is a finished test. Record that this idea did not move revenue, and spend the next slot on a different idea. Extending a flat test "just to be sure" without a new sample plan is peeking with a calendar excuse.

The last two rows are not readable results. If you have not hit the sample target, keep going until the planned end. If the split is nowhere near 50/50, or consent drop-off is uneven between variants, the health check has failed. Fix tracking and rerun. Do not interpret a broken assignment as a customer preference.

## Where UK Tests Go Wrong Around Seasons and Consent

A January winner can lose its edge when demand changes. Internet sales accounted for **27.1%** of total UK retail sales in 2024, rising from **26.3%** in the first quarter to **29.1%** in the fourth, according to the [Office for National Statistics internet sales series](https://www.ons.gov.uk/businessindustryandtrade/retailindustry/timeseries/j4mc/). The same series recorded **£2,199.2 million** of internet retail sales in January 2024 and **£3,227.5 million** in December 2024, an increase of about **46.8%**. A headline may appear to work in a busy period because demand has risen, not because the wording is stronger.

Compare the variant with a control running at the same time. Avoid launching across a sale if possible. If the test must run during a seasonal peak, do not compare its conversion rate with last month's. Keep the control available and check a January result in a later demand period before making the change permanent.

### Consent changes who you can count

Visitors who decline cookies may be missing from the measurable sample if your test depends on an identifier that is only available after consent. This makes consent coverage part of the test's validity: you may be measuring a different set of visitors from the people who saw each version. For general guidance on [privacy and consent](https://www.otterab.com/docs/getting-started/privacy-and-consent), consider how your testing setup handles visitors who decline.

Check whether consent coverage differs between variants. If a tag fails after someone rejects cookies, for example, one version may be missing mobile visitors from its results. You would then be comparing differences in tracking, rather than differences in shopper behaviour. Document how refused consent affects measurement, and apply the same rule to both versions.

### Delivery is often the real lever

Page design may not be the constraint. [Indez's UK ecommerce statistics](https://www.indez.com/blog/uk-ecommerce-statistics-2026) report that three in four UK shoppers abandon baskets when preferred delivery and returns options are unavailable. Delivery promises, parcel-shop options, returns messaging and exchange incentives can all be tested. They may matter more than changing a button colour.

Check the economics as well as the checkout rate. A variant might lift completion by hiding a fee or promising a delivery date the warehouse cannot meet. Pair the conversion result with cancellations, refunds, exchanges and customer-service contacts. If a new promise fills the inbox with “where is my order”, the test has not succeeded, even if checkout completion rose on day three.

> Treat season, consent coverage and the availability of the promised delivery option as checks on whether a result is trustworthy, not details to fix after you ship.

## Run Your First Test This Week

Pick one page this week, the highest-traffic URL where a single change could move revenue. That is usually a checkout step, a product page, or the delivery message itself. Write the hypothesis in one sentence with its reason. For example: showing "Order by 2pm for Thursday delivery" will lift checkout completion by 10% because shoppers abandon when the date is unclear.

Put the last four weeks of eligible visitors next to the sample table. If the target is reachable in about four weeks, keep the page. If it is not, choose a bolder change or a busier URL. Do not start a test you already know you will abandon.

Then do the three setup moves and stop. Install the one-line snippet, create the test, and use the live revenue dashboard to see what it earned. Before you build the variant, enter the baseline rate, the lift you want to detect and your daily traffic into the sample size calculator so the run length is a number, not a hope.

Block the end date in the calendar now. Write the decision rule beside it: ship only if **revenue per visitor** rises and refunds and average order value do not get worse. Name the owner and the page in that same calendar entry. A test without an owner runs past its stop date, gets peeked at, and ships on a Tuesday spike.

---

Otter A/B is built for this kind of test: a lightweight way to split a page, watch purchases and revenue per visitor rather than clicks alone, and read a result against a stop rule you set in advance. If you want the next delivery promise, headline or checkout step judged on money instead of a two-day green arrow, start with [Otter A/B](https://www.otterab.com).

---

Canonical page: https://www.otterab.com/blog/how-to-do-a-b-testing
