A/B testing
A method in which two versions of a page, email or ad are shown to randomly split visitors so that data shows which one brings more conversions.
What is A/B testing?
A/B testing (an A/B test or split test) is a method of comparing two versions of the same thing – a page, a button, a form, an email or an ad. Traffic is split at random: some people see the original version A, others see the changed version B. Once enough visitors have taken part, you compare a metric chosen in advance, usually the conversion rate, and use a statistical calculation to confirm the difference is not down to chance. The winning version is then rolled out to everyone. Instead of guessing what might work, decisions are based on data from real customers.
Why It Matters
Every website change is a guess: a new headline, a shorter form or a different photo can raise conversions, but they can just as easily lower them. A/B testing checks that guess before you make the change permanent. For a business this means more enquiries or orders from the same traffic, with no extra advertising spend. It also protects you from costly mistakes, such as a redesign based on management's taste that reduces sales. A/B testing is not right for everything, though – on a low-traffic website a test takes too long and the result can be misleading.
Real-World Examples
- 1Testing two labels for the main button on a product page, for example “Add to basket” versus “Buy now”.
- 2Comparing an enquiry form with eight fields against a shorter version with four fields.
- 3An A/B test of a newsletter subject line: a small part of the list receives each version and the tool then sends the winner to the remaining contacts.
- 4A Google Ads experiment that sends half of a campaign's budget to a new bidding strategy and compares the results with the original campaign.
- 5Illustrative (fictional) example: a furniture e-shop tests two versions of its free-delivery message on a category page – a plain text line and a prominent banner above the product listing – and tracks which version leads more people to complete an order.
How an A/B test works, step by step
A reliable A/B test follows a fixed process. Skip it and you get numbers, but not an answer.
- Hypothesis. State what you will change and why it should help, for example: “If we move the price list above the form on the service page, more people will send an enquiry because they won't leave to look for the price.” Data from Google Analytics 4, heatmaps or user testing provide the basis for a hypothesis.
- One primary metric. Decide in advance what you will judge by – a submitted form, a purchase, a click on a CTA. Track other metrics as guardrails.
- Variant B. Change one thing or one coherent block, so it is clear what caused the difference.
- Traffic split. The tool randomly assigns each visitor to group A or B and keeps showing them the same version on later visits. A 50/50 split is typical.
- Evaluation. Stop the test only once it reaches the number of visitors and conversions calculated in advance. Statistical significance decides, not which version happens to be ahead.
- Roll-out and the next test. Release the winning version to everyone, remove the test code and record the result. A losing test is useful information too.
What is worth A/B testing on a website
Changes where visitors make decisions have the biggest impact. Button colour usually comes last.
- Headline and first screen – whether visitors grasp within seconds what you offer and who it is for.
- Call to action – wording, placement and number of buttons.
- Forms – number of fields, required details, splitting into steps.
- Price presentation – prices from, packages, comparison tables, delivery information.
- Trust – placement of reviews, guarantees and references.
- [Landing page](/glossary/landing-page) structure – order of sections, page length.
Besides the classic A/B test there are two related variants. A split URL test compares two different addresses, typically an old and a new page template. A multivariate test combines several changes at once (for example three headlines and two images) and looks for the best combination – but it needs far more traffic, so it makes little sense for most smaller websites.
How much traffic an A/B test needs
The most common mistake is to evaluate a test too early. The number of visitors you need depends on your current conversion rate and on how small a difference you want to detect reliably. You can work it out with a sample size calculator (such as Evan Miller's free calculator); the usual settings are a 5% significance level and 80% statistical power.
Illustrative calculation: a website with a 2% conversion rate wants to detect an improvement to 2.4% (a fifth). A standard calculation gives roughly 21,000 visitors per variant, so more than 42,000 in total. If it were looking for an improvement to 3%, about 3,800 visitors per variant would be enough. The smaller the difference you look for, the more data you need.
Run the test for whole weeks so that it covers weekdays and the weekend, and do not stop it the moment one version happens to lead. If your website lacks traffic, you are better off investing in user testing with a few people, behaviour analysis in GA4 and bolder changes whose effect is visible without statistics – and testing where the volume is, such as in emails or ads.
A/B testing tools in 2026
Google shut down the free Google Optimize on 30 September 2023, and Google Analytics 4 has no built-in website A/B testing tool. Google named AB Tasty, Optimizely and VWO as partners for GA4 integration; other tools such as Convert also integrate through the public API. You can then follow test results in GA4 as well.
- Website and e-shop: VWO, AB Tasty, Optimizely, Convert – visual variant editor, traffic splitting and statistical evaluation.
- Google Ads: the Experiments feature splits budget and traffic between the original and a modified campaign, and lets you apply the result. More in our Google Ads guide.
- Facebook and Instagram ads: Meta Ads Manager has its own A/B test feature for comparing creatives, targeting or placements.
- Email: tools such as Ecomail can A/B test the subject line, sender name and campaign content – see email marketing.
On a website, simple changes (copy, order of blocks) are fine in the tool's visual editor; larger template changes are safer to build directly in the website code with traffic split on the server.
A/B testing and SEO: how to test safely
Google does not forbid A/B testing, and according to its documentation small changes (colour, button placement, call-to-action wording) usually have little or no effect on rankings. Follow four rules from Google Search Central, though:
- No cloaking – Googlebot must not get different URLs or content than people do.
- rel="canonical" on test URLs pointing to the original page (Google recommends it over noindex).
- 302 redirects, not 301, if the test redirects visitors to another URL.
- Run the test only as long as necessary – once it ends, roll out the winner and remove test URLs and scripts.
Keep speed in mind too: testing-tool scripts that hide the page until the variant loads can hurt Core Web Vitals. Load the test code only on pages where a test is running.
Common A/B testing mistakes
- Stopping the test as soon as the result turns “green” instead of after reaching the planned sample.
- Several unrelated changes in variant B – you won't know what worked.
- Testing during a sale, holidays or a big campaign, when visitors behave differently from usual.
- Looking only at site-wide results without checking mobile and desktop separately.
- Optimising for clicks instead of orders or enquiries.
- Starting a test without verified conversion tracking – if GA4 or the tool does not count conversions correctly, the result is worthless.
When to hand A/B testing to specialists
An A/B test needs a good hypothesis, reliable measurement, technical implementation that does not hurt speed or SEO, and correct evaluation. If your website is still being built or redesigned, it is more efficient to build it with UX and measurement in mind from the start and test once you have real data.
At Weboptim we build websites and e-shops with working conversion tracking and test where it makes sense – on pages with traffic, in ads and in emails. Take a look at website development, e-commerce development or PPC campaign management.
Frequently asked questions
What is A/B testing?
A/B testing compares two versions of a page, email or ad on randomly split visitors. Using a metric chosen in advance, typically the conversion rate, and a statistical evaluation, you find out which version works better and then roll it out to everyone.
How long should an A/B test run?
An A/B test should run until it reaches the number of visitors calculated in advance, and always for whole weeks so it covers weekdays and the weekend. Stopping it when one version happens to lead is the most common mistake. For experiments, Google Ads says the modified campaign takes about 7–14 days to stabilise.
How many visitors do I need for an A/B test?
It depends on your conversion rate and the size of the difference you want to detect. As an illustration, a website with a 2% conversion rate needs roughly 21,000 visitors per variant to detect an improvement to 2.4%. A sample size calculator gives the exact number.
Does A/B testing hurt SEO?
No, if you follow Google's recommendations: no cloaking, rel=canonical on test URLs, 302 rather than 301 redirects and running the test only as long as necessary. According to Google, small changes to page elements usually do not affect rankings.
What replaced Google Optimize?
Google Optimize ended on 30 September 2023. Google named AB Tasty, Optimizely and VWO as GA4 integration partners, and other tools such as Convert are available too. For ads and emails, the built-in A/B tests in Google Ads, Meta Ads and email tools are enough.