A/B testing best practices: How to create experiments that convert

Updated on June 9, 2025

·

Originally published on February 12, 2024

How (and Why) to Tie Your Personalization Strategy to Revenue Goals

Effective A/B testing isn’t just a question of changing the color of a button on your landing page or tweaking the subject line of an email. You’ll need to build your A/B testing strategy on a foundation of careful planning, execution, and analysis.

In this blog post, we’ll explore best practices for A/B testing: how to formulate a strong hypothesis, select the right variables to test, ensure your sample size is representative, and accurately interpret the results. We'll also discuss how to avoid some common A/B testing pitfalls, and ensure your tests contribute to a better understanding of your target audience.

The post is designed to equip you with the knowledge to create effective A/B testing experiments that not only increase conversion rates, but provide valuable insights that can fuel future marketing campaign strategies.

1. Start with a hypothesis

In the context of A/B testing, a hypothesis is an educated guess or assumption about what you believe could improve the performance of your webpage, email, or other marketing assets. It's a prediction about the relationship between two variables: the element you are changing (independent variable) and the outcome you want to influence (dependent variable).

A/B test hypothesis

For example, let's say that the conversion rate on your product page is lower than industry standards. You might hypothesize that changing the color of the "Add to Cart" button from grey (which may blend with the background) to a bright and bold color like red (which stands out) will make it more noticeable, and therefore increase click-throughs and conversions.

In this case, your hypothesis might be stated as: "If we change the 'Add to Cart' button color to red, then the conversion rate will increase because the button will be more noticeable."

A hypothesis is crucial for numerous reasons:

  • Direction: A hypothesis gives your test a clear direction and purpose. Knowing what you're testing and why helps you focus on achieving specific goals.

  • Measurement: A hypothesis enables you to measure the impact of your test variations. By defining what you expect to happen when you change something, you can better assess whether that change had a desired effect on website traffic.

  • Insight: The hypothesis provides valuable insights into user behavior. Even if your hypothesis turns out to be incorrect, you’ll still gain useful information about what doesn't work, and use it to refine future tests.

  • Efficiency: A hypothesis saves time and resources. By focusing on testing elements that are based on a well-thought-out hypothesis, you’ll avoid random testing which may not yield meaningful results.

Remember, a good hypothesis is specific, testable, and based on research and data. It's not just a random guess, but a well-informed assumption that guides your A/B testing toward meaningful improvements.

2. Test one element at a time

If you’re just starting with A/B testing or experimentation, it’s difficult to overstate the importance of testing one element at a time during A/B testing. 

This approach is known as "isolated testing," and is crucial for accurately identifying what is driving any changes in your performance metrics.

For example, suppose you decide to test both a new headline and a different call-to-action (CTA) button color, simultaneously, on a web page. If you notice an improvement in conversion rates, it would be impossible to discern whether the change was due to the new headline, the altered CTA color, or a combination of both.

By testing multiple elements at once, you muddy the testing waters, and make it difficult to draw clear conclusions from your data or how to optimize your landing pages. The results become ambiguous, and you lose the opportunity to gain precise insights about the impact of each individual change.

On the other hand, if you test one element at a time — first the headline, then the CTA color — you’d be able to clearly attribute any change in performance to the specific element you modified, and derive actionable insights that you can use to optimize your landing pages further.

To implement isolated testing effectively, you’ll need to:

  • Prioritize your tests: Not all variables have the same impact on conversions. Prioritize testing those elements that are likely to have a significant effect on user behavior, such as headlines, CTAs, or images.

  • Plan your tests: Create a testing roadmap where you outline what elements you will test, and in what order. This helps you stay organized and ensures you don’t skip important elements.

  • Analyze and iterate: After each test, analyze the results, implement the winning version, and then move on to the next element. Remember, conversion-rate optimization (CRO) is a continuous process of testing, learning, and improving.

3. Use a representative sample size

Having a representative number of test subjects is another critical component of successful A/B testing. It's the key to obtaining reliable and statistically significant results.

In A/B testing, your sample size refers to the number of users who are exposed to each version of your test. If the size of your sample is too small, your results may be influenced by random chance rather than reflecting genuine user behavior or preferences. On the other hand, if you have a large enough sample size, you're more likely to capture a true representation of your audience's responses.

Let's illustrate this with an example. Imagine you're testing two headlines on your website landing page, and you only expose each version to 10 visitors. Even if one headline outperforms the other, with such a small sample size, it's going to be difficult to confidently say that the result wasn't due to chance. However, if you tested each headline with 1,000 visitors, your results would be much more reliable, and you could confidently implement that variant on your live landing pages.

Here are some tips to ensure a representative sample size in your A/B tests:

  • Calculate required sample size before starting: There are many online tools and calculators available that can help you determine the optimal sample size based on your website's traffic, expected conversion rates, and desired confidence level.

  • Test until you reach your desired sample size: Cutting a test short could lead to inaccurate results. Be patient and allow the test to run until you've reached your pre-determined sample size.

  • Ensure your sample is diverse: To get a true representation of your audience, make sure your sample includes a mix of different types of users (new visitors, returning visitors, users from different locations, and so on).

Remember, the goal of A/B testing is not just to find out which version is better, but to gain insights that you can confidently apply to optimize your marketing strategy.

4. Allow sufficient run time

The statistical significance and reliability of A/B test results depend not only on sample size, but on the duration of the test.

If you stop a test too early, you risk making decisions based on incomplete or misleading data. For example, if you launch a test and see a dramatic increase in conversions within the first few hours or days, it might be tempting to declare a winner and implement changes immediately. 

Running a test for insufficient time can be problematic for the following reasons: 

  • Initial fluctuations: It's common to see large swings in performance when a test first starts. These often settle down over time, and early results may not reflect the true effect of the change.

  • Variability in user behavior: User behavior can vary significantly depending on day of the week, time of day, or even season of the year. Running a test for a short period may only capture a subset of your audience's behavior and fail to generate enough reliable data.

  • Statistical significance: The longer a test runs (assuming it's receiving enough traffic), the more confident you can be that it will achieve statistically significant results. Short tests are more susceptible to random variations that can lead to false positives or negatives.

As a rule of thumb, it's recommended to run a test for at least one full business cycle (usually a week) to account for daily and weekly variations in user behavior, and to ensure you gather enough data. However, ideal duration may also depend on factors like your website's traffic, baseline conversion rate, and the minimum detectable effect.

5. Analyze and interpret the results correctly

Analyzing A/B test results is not just about identifying a winning variation, but understanding why one version performed better than the other — and how these insights can be applied to future optimization efforts.

A/B test analyze results

Surface-level data, such as conversion rates and click-through rates, can provide a quick overview of better performing variants. However, in order to fully understand the implications of your test results, you’ll need to conduct deeper analysis. Here's how you can go about it:

  • Segment your data: Break down your results by different user segments such as new vs. returning visitors, different traffic sources, device types, geographic locations, and so on. This can reveal valuable insights and help you to understand if certain changes work better for specific segments of your audience.

  • Analyze secondary metrics: Don't just focus on your primary conversion goal. Explore how the test affected secondary metrics like, number of website visitors, time on page, bounce rate, and pages per visit. This approach typically provides a more holistic view of user behavior and the overall impact of the test.

  • Look for statistical significance: Ensure that your results are statistically significant. This means that the difference in performance between the two versions is not due to random chance. Tools like a p-value calculator can help with this.

  • Draw conclusions and hypotheses: Based on your analysis, draw conclusions about why one version outperformed the other. Use these insights to form new hypotheses for future tests.

  • Document everything: Keep a record of all your tests, results, and learnings. This will help you build a knowledge base and avoid repeating unsuccessful tests in the future.

Beyond prompting a lift in conversions and engagement, your A/B testing strategy can help you develop a deeper understanding of your users and their behavior when they interact with your web pages or your apps. By analyzing and interpreting your results correctly, you can ensure that your testing efforts contribute to long-term, sustainable growth.

6. Iterate and improve

The goal of CRO is not just to find a "winning" version and stop there, but to continuously learn about users, iterate on designs, and improve your website's performance over time.

A/B testing is essentially a scientific method applied to your website or app. You formulate a hypothesis, design an experiment (conduct the A/B test), collect data, and then analyze the results. However, the process doesn't end there. Based on what you've learned, you then create a new hypothesis and start the process over again.

For example, let’s say you run an A/B test on your product page, changing the color of the "Add to Cart" button from blue to green. The green button results in a 10% increase in clicks — which is a positive result, but why stop there? Next, you might ask: "Would a different shade of green result in even more clicks?" or "What if we make the button larger?" or "What if we change the text on the button?" Each of these questions can form the basis of a new A/B test.

Here are some tips for iterating and improving through A/B testing:

  • Be methodical: Don't change too many things at once. If you do, you won't know which change caused the difference in performance. Stick to one variable at a time whenever possible.

  • Continue learning: Even "failed" tests — those where there was no significant difference between versions, or where the original version outperformed the new one — are valuable. They offer insights into what doesn't work for your audience.

  • Prioritize your tests: Not all changes to your content are going to have the same effect on performance metrics. Prioritize tests based on potential impact and ease of implementation.

  • Patience and persistence: Optimization is a long-term process. Don't be discouraged by tests that don't result in a big lift. Even small, incremental improvements can add up over time.

To sum up, A/B testing should be considered a tool for continuous learning and improvement, and you should always be testing, tweaking, and learning from your findings.

7. Document everything

Documentation is a crucial part of the optimization process. It might seem like an administrative chore, but it serves several important purposes in your CRO strategy, including creating a historical record of your tests, which can be extremely valuable for several reasons:

  • Learning from past tests: By documenting the results of each test, you can see what worked and what didn't. This can help you avoid repeating the same mistakes, and build upon successful strategies in future marketing campaigns.

  • Understanding your audience: Over time, your testing documents will provide a composite picture of your audience's preferences and behavior. You may notice, for example, that certain types of headlines consistently perform better, or that your audience responds well to specific calls to action. These insights can guide future tests and broader marketing strategies.

  • Informing future tests: When planning new tests, it's helpful to look back at previous ones for ideas and insights. You may find patterns that suggest new hypotheses to test.

  • Maintaining consistency: Documenting your tests also helps ensure consistency in how you conduct and evaluate them. For example, you can note down the statistical significance level you're using, how you segment your data, and so on. This makes it easier to compare results across different tests.

  • Communicating results: If you're part of a larger team, documentation can help you communicate your findings to other stakeholders. Here, documentation provides a clear, objective record of what was tested, the results, and any changes that were implemented as a result.

In terms of what to document, you should include the hypothesis of the test, the elements that were changed, the duration of the test, how much traffic the test saw, the results (including statistical significance), and any observations or conclusions. Tools like Google Sheets or project management software can be used to keep track of all this information.

The bottom line

The true power of A/B testing lies not just in executing tests, but in adopting a systematic, data-driven approach to understanding your users and their behavior.

From formulating a strong hypothesis, designing effective experiments, and analyzing results, to continually iterating based on your findings and documenting your process, each step of an A/B test is crucial. 

Remember, it's not just about finding a winning variant, but about gaining insights that can lead to ongoing improvements in your conversion rate. And, with that in mind, you can use these best practices to create experiments that convert, optimize future marketing and ad campaigns, and, ultimately, boost your business's bottom line.

A/B testing with Contentful

Ready to get started on your A/B testing journey? Check out our AI-powered testing and personalization solution, Contentful Personalization, and explore a wide range of potential content tests in our ebook: 26 A/B testing ideas to increase click-through rates and boost conversions.

Subscribe for updates

Build better digital experiences with Contentful updates direct to your inbox.

Meet the authors

Esat Artug

Esat Artug

Senior Product Marketing Manager

Contentful

Esat is a Senior Product Marketing Manager at Contentful and enjoys sharing his thoughts about personalization, digital experience, and composable across various channels.

Related articles

Insights

Composable commerce migration

January 24, 2025

Insights

You need a headless CMS for true personalization

December 31, 2023

Serverless architecture and microservice architecture offer significant software development benefits. Explore both types of architectures in our guide.
Insights

Serverless and microservices: A tale of two architectures

December 31, 2023

Contentful Logo 2.5 Dark

Ready to start building?

Put everything you learned into action. Create and publish your content with Contentful — no credit card required.

Get started