Key takeaways
- An A/B test splits visitors at random between two versions and compares an outcome. Its value is that it separates the effect of your change from everything else that moved that week.
- Decide the metric, the minimum effect worth detecting and the sample size before you start, then do not stop early because the dashboard looks good.
- Many stores do not have the traffic to detect small differences. When you do not, test bigger changes, or use research and before-and-after checks and call them what they are.
A/B testing for ecommerce means showing two versions of a page, price, message or flow to randomly assigned visitors and comparing an outcome such as orders per visitor. Done well, it tells you whether a change caused a difference. Done badly, it produces confident wrong answers. This guide covers what to test, how much traffic you need, the most common way tests go wrong, and how to read a result without overselling it.
What an A/B test can and cannot tell you
Random assignment is the whole trick. If visitors are split by chance, the two groups should be similar in everything except the change, so a difference in outcome can be traced to the change, plus some noise. A before-and-after comparison cannot do this, because the week after a redesign also differs in traffic mix, promotions, weather and what competitors did.
A test answers a narrow question: for this audience, in this period, did version B produce a different result on this metric than version A? It does not tell you why, it does not guarantee the result holds next season, and it says nothing about metrics you did not measure. Treat each result as evidence, and keep a record of what you tested and what you decided.
What to test first
Start where the money is. Find the steps with the most visitors and the biggest drop-off, then test changes that could plausibly move them. The research firm Baymard Institute, which studies checkout design, lists reasons shoppers give for abandoning a cart. On its [cart abandonment statistics page](https://baymard.com/lists/cart-abandonment-rate), among shoppers who gave a reason other than just browsing, 40% cite extra costs being too high, 18% say the site wanted them to create an account and 17% cite a too long or complicated checkout. Those are hypotheses worth testing in your own store, not guarantees about it.
Data table for this figure
| Step | Detail |
|---|---|
| Measure | where shoppers drop off |
| Pick one change | the biggest leak first |
| Run the test | split traffic fairly |
| Read the result | with the metric you chose |
| Keep or revert | log what you learned |
| Area | Example change | Primary metric |
|---|---|---|
| Product page | Reorder images, change the lead benefit, add size guidance | Add-to-cart rate |
| Cart | Show shipping cost and delivery date earlier | Cart to checkout rate |
| Checkout | Offer guest checkout, cut optional fields | Checkout completion rate |
| Pricing and offers | Free-shipping threshold, bundle structure | Revenue per visitor |
| Subject line, send time, first-flow offer | Orders per recipient | |
| Collection pages | Default sort, filter placement | Product-view rate and revenue per visitor |
Prefer revenue per visitor or orders per visitor as the final judge when you can measure it, because a change that lifts add-to-cart but lowers completed orders is not a win. Keep one primary metric per test. Others are for diagnosis.
Write the hypothesis before you build
A usable hypothesis has four parts: the change, the audience, the metric and the reason. For example (an illustration, not a tested result): showing delivery date on the cart page, for all mobile visitors, will raise the cart-to-checkout rate, because shoppers cite slow delivery as a reason to leave. If you cannot state the reason, you are guessing, and a guess that wins teaches you nothing you can reuse.
- State the change in one sentence.
- Name the single primary metric and where it is measured.
- Name the smallest improvement that would be worth shipping.
- Write down the sample size and the planned end date.
- Record who decides, and what happens on a win, a loss or a flat result.
How much traffic you need
Sample size depends on your baseline conversion rate and the smallest effect you want to detect. Evan Miller, a statistician who writes about experiment design, gives [a rule of thumb: n = 16 × σ² ÷ δ²](https://www.evanmiller.org/how-not-to-run-an-ab-test.html), where δ is the minimum effect you wish to detect and σ² is the sample variance you expect. For a conversion rate, he says, the variance is p × (1 − p). His page does not say whether n is per variant or in total. The standard two-group calculation at 5% significance and 80% power gives roughly this figure per variant, so the table below treats it that way; his interactive sample size calculator lets you set power and significance yourself.
The numbers below are assumptions to show the arithmetic, not a result from any store.
| Assumption or step | Value |
|---|---|
| Baseline conversion rate (p) | 3.0% |
| Smallest lift worth detecting (δ) | 0.6 percentage points (3.0% to 3.6%) |
| Variance, p × (1 − p) | 0.03 × 0.97 = 0.0291 |
| Sample per variant, 16 × 0.0291 ÷ 0.006² | about 12,900 visitors |
| Total for two variants | about 25,900 visitors |
If a page gets 2,000 visits a week to the tested step, that test would take about thirteen weeks. That is a realistic picture for many small stores. Halving the detectable lift roughly quadruples the sample, because δ is squared in the denominator, so chasing small effects is expensive. When the arithmetic says you cannot reach the sample in a reasonable time, you have three honest options: test a bigger change, test somewhere with more traffic, or skip the test and use qualitative research.
Want the evidence, not the theory?
Every growth figure on this site is computed from a dated start and end value with linked sources.
The peeking problem
The most common error is stopping a test the moment it shows a significant result. Evan Miller's article is blunt about it: if you say “we’ll run it until we see a significant difference,” the reported significance levels become meaningless. In his worked example, a test with a 50% baseline conversion rate, stopped at the first 5% significance or after 150 observations, wrongly finds a significant result 26.1% of the time when the change does nothing, against the 5% most people assume.
Data table for this figure
| Stage | Question to ask |
|---|---|
| Visit | Who arrives, and from which channel? |
| View a product | Does the page answer the shopper's questions? |
| Add to cart | Are price, proof and delivery clear? |
| Start checkout | Do fees or steps surprise them here? |
| Purchase | Can they pay the way they expect to? |
He also gives a table of the reported significance you would need to see to have an actual 5% level if you peek: 2.9% after one peek, 2.2% after two, 1.4% after five and 1.0% after ten. His advice is to decide the sample size in advance and wait until the experiment is over before believing the dashboard's figures. If you need to stop early for business reasons, use a method designed for it, such as sequential or Bayesian designs, which he names as alternatives.
- Set the end date and sample size before launch and write them in the test record.
- Look at the dashboard to check the test is running and tracking, not to decide.
- Do not add variants midway; start a new test.
- Do not change traffic allocation midway unless the tool is built for it.
Reading the result
| Outcome | What it means | What to do |
|---|---|---|
| B clearly better, sample reached | Evidence the change helped on the primary metric | Ship it; keep monitoring revenue and returns |
| No clear difference | The change did not move the metric by an amount your test could detect | Do not call it a loss; decide whether a bolder version is worth testing |
| B clearly worse | Evidence the change hurt | Do not ship; write down what you learned about the audience |
Look at the interval around the estimate, not just whether it passed a threshold. A hypothetical result of plus 4% with an interval running from minus 3% to plus 11% cannot rule out no effect, or even a loss. Check that the split was even, that there was no tracking fault, and that the winning version did not pull orders forward from next week through a discount.
Segment cautiously. If you cut a result by device, country, new versus returning and traffic source, some segment will look significant by chance. Treat segment findings as ideas for the next test rather than conclusions.
What the cases tell us, and what they do not
Our case records do not report A/B test results, and we do not infer any. A few records do mention testing or trial steps. Brooklinen used “Kickstarter pre-orders ($236,888) as launch demand test”, a demand test at the product level rather than the page level, and also lists “Kickstarter pre-orders ($236,888) as launch demand test” among its levers. For Dollar Shave Club, the record lists “Viral launch video (about $4,500 to produce) used as launch and fundraising asset”.
Nutrisystem tested TV and radio in 2004 before scaling. The record describes “Direct-response media scaled from 2004: TV and radio testing in 2004, then print and infomercials (Wharton, 10-K marketing spend $3.5M in 2003 to $118.5M in 2006)”, with revenue going $22.6M to $568.2M in 36 months. Of the 30 cases, 5 list email or SMS among their channels. Email is a convenient place to run frequent tests because you control the audience and can split it, though how fast results arrive depends on your list size.
Cases mentioned in this article
When you do not have the traffic
- Test bigger changes. A larger effect needs a smaller sample, so a new offer structure is easier to detect than a button colour.
- Use email and ads as test beds. Subject lines, creative and landing-page variants reach thousands of people quickly.
- Read support tickets and watch real shoppers before inventing hypotheses.
- Treat before-and-after checks as weaker evidence than a randomised test.
A simple testing routine
- Keep a backlog of ideas, each with a reason and the step it targets.
- Rank by the traffic at the step, the size of the leak and the effort to build.
- Write the test record: hypothesis, metric, sample size, dates, decision rule.
- Log the outcome, the decision and what you will do next, including for flat results.
The metrics a test should move are defined in ecommerce analytics metrics. For credit across channels, see ecommerce attribution, and for what to test on the page itself, read ecommerce product page SEO and browse the case database.
Spotted a mistake?
There is no comment form on this site. Errors are tracked on the corrections list described in the method.