Analytics

A/B testing on Shopify: a practical guide

How to A/B test on Shopify: hypothesis, sample size, what to test, apps vs Rollouts, reading results, and checking the winner also wins on profit.

·7 min read·By the ROASaurus team

Key takeaways
  • An A/B test shows one version of a page to part of your visitors and another version to the rest, so the data decides which works better.
  • Test one change at a time, decide the success metric before you start, and run the test for at least one or two full weeks.
  • You need far more visitors than most people expect: small lifts on a low conversion rate take tens of thousands of visitors per version.
  • Shopify offers theme experiments through Rollouts; apps add product, price and checkout tests; a manual split with analytics works for simple cases.
  • A variant that wins on conversion rate can still lose on profit: check revenue and profit per visitor before you roll it out.

A/B testing on Shopify means showing two versions of something in your store, such as a product page layout, a headline or a shipping offer, to two random groups of visitors at the same time, and keeping the version that performs better. It is the lowest-risk way to improve a store: instead of redesigning everything and hoping, you change one thing for part of your traffic and let real shoppers decide.

This guide covers how a test works, a step-by-step process, what to test first, the ways to set up tests on Shopify, how to read the results, and why the winner should also be checked on profit, with a worked example.

What is A/B testing and why does it matter?

In a test, version A (the control) is what you have now and version B (the variant) has one change. A testing tool assigns each visitor at random to A or B and keeps them there, so returning visitors see the same version. After enough visitors, you compare the two on the metric you chose. Because both groups shop at the same time, seasonal swings, ad changes and news affect them equally, which is what makes the comparison fair.

The alternative is guessing, or comparing this month with last month. A before-and-after comparison mixes your change with everything else that changed: traffic sources, promotions, the weather. A test isolates the change.

How to run a Shopify A/B test, step by step

  1. Start with a hypothesis

    Write down what you change, what you expect and why. "Showing delivery dates on the product page will raise add-to-cart rate, because shoppers ask about delivery in support chats." A hypothesis comes from data: funnel drop-offs, support questions, reviews, session recordings.

  2. Change one thing

    If you change the headline and the button colour together, you will not know which caused the result. One variable per test.

  3. Choose the success metric in advance

    Usually purchase conversion rate or revenue per visitor; for an upper-page test, click-through to the next step. Pick secondary metrics too, such as average order value and refund rate.

  4. Split the traffic

    A 50/50 random split is standard. Use 80/20 only when the change is risky and you want to limit exposure, knowing the test will take longer.

  5. Run it long enough

    At least seven days, better fourteen, so every weekday is in both groups, and until you reach the sample size you planned. Do not stop because B leads on day three: early leads are often noise.

  6. Analyse, implement, repeat

    Roll out the winner, or keep the original, and write down what you learned. Every result, including "no difference", feeds the next hypothesis.

How many visitors do you need?

Fewer than people hope is never enough. A rough rule of thumb for a test at 95% confidence that detects a real difference most of the time:

Visitors per version=16 × p × (1 − p) ÷ d²
p
Your current conversion rate, as a fraction (2% = 0.02).
d
The smallest absolute difference you want to detect (2.0% to 2.3% is 0.003).

At a 2% conversion rate, detecting a lift to 2.3% needs 16 × 0.02 × 0.98 ÷ 0.003² ≈ 35,000 visitors per version.

That is why small stores should test big, bold changes on their busiest pages: a large difference needs far fewer visitors to show up than a small one.

What to A/B test on your Shopify store

Start where traffic is high and the page sits close to the purchase. Footer links and favicon colours can wait.

WhereIdeas to test
Product pagesImage order and lifestyle vs product shots, price display, delivery dates, reviews placement, the add-to-cart button text, bundles, description length
Homepage and landing pagesThe headline and hero image, which products are shown first, the main call to action, a page that matches the ad exactly
Collection pagesDefault sort order, filters, number of products per row, quick add
Cart and pre-checkoutA free-shipping threshold, shipping cost shown earlier, trust badges, cross-sells, express payment buttons
Whole themeA new theme or layout against the current one, navigation structure
Pick tests with a clear hypothesis from your own data, not from a generic list.

Apps, Rollouts or manual: how to set up tests on Shopify

MethodGood forWatch out for
Shopify Rollouts (Markets › Rollouts)Experiments that compare a theme change or a different theme against your live theme, on a share of trafficCheck which Shopify plans include experiments; it covers theme and storefront changes, not every kind of test
A testing app from the Shopify App StoreProduct page, price, shipping and content tests without code, with statistics built inMonthly cost; some apps add script weight or a short flicker as the variant loads
Manual: two theme versions or two landing pages, split by link or ad, measured in analyticsSimple tests such as two landing pages for one campaignYou must randomise and calculate significance yourself; easy to get wrong
Google Optimize, once a common free tool for this, was shut down in 2023.

When you compare apps, look at what they can test (themes, prices, shipping rates, checkout), how they split visitors, how they calculate significance, whether they report revenue per visitor and not just conversion rate, and what they do to page speed.

Best practices

Setting tests up to succeed
  • One hypothesis, one change, one primary metric
  • Plan the sample size before you start
  • Run full weeks, avoid big sale days unless you test for them
  • Check both versions on mobile and desktop before launch
  • Keep ads and promotions stable during the test
Reading results correctly
  • Do not peek and stop at the first good-looking day
  • Wait for 95% confidence and your planned sample size
  • Look at revenue and profit per visitor, not only conversion rate
  • Check segments (mobile, new visitors) only to learn, not to rescue a loser
  • Re-test big wins: a lift that holds twice is real

Worked example: the winner that loses money

An example store tests a banner offering 10% off the first order against its current product page. Each version gets 36,000 visitors:

Example dataA: current pageB: 10% off banner
Visitors36,00036,000
Orders720828
Conversion rate2.0%2.3%
Average order value$70$63
Revenue per visitor$1.40$1.45
Profit per order (after costs)$24$17
Profit per visitor$0.48$0.39
Example data. B converts 15% better and brings in 3.5% more revenue per visitor, but earns 18.5% less profit per visitor, because the discount comes off every order.

The difference in conversion rate is statistically significant at these numbers. A testing app would call B the winner. But the discount costs $7 on every order, and the extra orders do not make up for it: profit per visitor falls from $0.48 to $0.39. Rolling out B would sell more and earn less. Unless the discount brings in new customers who come back and order again at full price, A is the better page.

Analysing results and scaling what works

A test ends in one of three ways: B wins, A wins, or there is no meaningful difference. All three are useful. A win is rolled out, then confirmed in your normal reports over the following weeks. A loss tells you the hypothesis was wrong, which saves you from a change that would have cost money. No difference means the element does not matter much to shoppers: spend your next test elsewhere.

To scale testing into a programme, keep a backlog of hypotheses ranked by expected impact and effort, run one test per page at a time, record every result in one place, and repeat the best ideas on other pages and products.

Checking test results in ROASaurus

The ROASaurus Mac app showing Website visitors: sessions, users, bounce rate, conversion rate and revenue per session. Fictional demo store, simulated data.
The ROASaurus iPhone app showing Website visitors: sessions, users, bounce rate, conversion rate and revenue per session. Fictional demo store, simulated data.
Website › Visitors in the public demo (ROASaurus Demo Store, a fictional store): conversion rate and revenue per session by landing page and source.

ROASaurus is not a testing tool: it does not split traffic. It helps around the test. Before a test, Website › Funnel shows where shoppers drop off per campaign, which is where your hypotheses come from. When a test uses two landing pages, Website › Visitors compares them on sessions, add-to-cart rate, conversion rate and revenue per session. After a rollout, Profit › Overview and Profit › Orders show whether average order value, refunds and profit per order moved the way the test promised, and Customers › Cohorts shows whether customers won by a first-order offer come back.

Next step

Sources

  1. Shopify Help Center: Rollouts
  2. Shopify Changelog: Schedule and test storefront changes with Rollouts
  3. Google Marketing Platform: Sunset of Google Optimize

In ROASaurus

Keep reading

AnalyticsConversion rate in GA4 for ecommerce, per collectionHow GA4 calculates session and user key event rates, how to get a purchase conversion rate per channel and per collection, and what to fix when it drops.AnalyticsEcommerce analytics and reporting tools: how to chooseThe kinds of ecommerce analytics and reporting tools, what each one answers, the features to compare and a scoring table to choose one for your store.AnalyticsEcommerce segments in GA4How to build user, session and event segments in GA4 explorations, with ten segments a webshop can use and the limits to keep in mind.

FAQ

Questions, answered

More answers in the FAQ and the help center.

Does Shopify have built-in A/B testing?

Shopify offers Rollouts under Markets › Rollouts, with an experiment type that compares a theme change or another theme against your live theme on part of your traffic. Check which plans include experiments. Apps add other kinds of tests.

How long should a Shopify A/B test run?

At least seven days, ideally fourteen, so every weekday is in both groups, and until you reach the number of visitors you planned. Do not stop early because one version leads.

How much traffic do I need for an A/B test?

More than most expect. At a 2% conversion rate, detecting a lift to 2.3% takes about 35,000 visitors per version. Smaller stores should test bigger changes on their busiest pages.

What should I test first on Shopify?

High-traffic pages close to the purchase: product pages, the cart and key landing pages. Start with the step where your funnel loses the most shoppers.

What metric should decide an A/B test?

Pick it before the test starts. Conversion rate or revenue per visitor are common; for tests that touch price, discounts or shipping, use profit per visitor.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. Free plan, no credit card.