Switchback Testing: When You Cannot Split Users in an AB Test

Switchback testing illustration of a mountain road whose legs alternate between A and B time blocks, with washout stretches after each switch

Switchback testing is an experiment design that switches the whole store between control and variant over time, instead of splitting shoppers into groups. For an ecommerce site, each time block shows one version to everyone. Use it when a user split is unsafe or leaks, such as a sitewide shipping threshold, a merchandising rule or a price display.

This guide is for ecommerce teams who need to test a store-wide rule. Our guide to free shipping threshold testing covers which number to try. This post covers the design you need when a normal 50/50 split would confuse shoppers or contaminate the control.

  • In our apparel store model, a $60 threshold beat $75 by 4.33% in revenue per visitor.
  • Analyzing every day of a 28-day switchback showed only 3.38%, because returning shoppers carried the old threshold into new blocks.
  • Dropping the 10 switch days restored the 4.33% estimate. Extra shipping cost then cut the net gain to 2.57%.
  • Treating sessions as independent doubled the false positive rate from about 5% to 9.8%.

What Is Switchback Testing?

Switchback testing randomizes time, not people. The store runs version A for a block, then version A or B for the next block, by a coin flip. Every shopper in a block sees the same version, so the two arms never share the same moment.

Definition: A switchback experiment assigns whole time blocks, such as days or hours, to control or treatment. The block is the unit you randomize and the unit you analyze. Some teams call it a time split test, because the split happens on the calendar instead of the visitor list.

The design is older than online testing. In 2023, Bojinov, Simchi-Levi and Zhao published Design and Analysis of Switchback Experiments in Management Science (checked Dec 2026). It derives the optimal design when a treatment keeps acting after it is switched off. Two of its results matter for stores. A fair coin, with a 50% chance per block, is optimal. And the best randomization rhythm depends on how long the carryover lasts.

Delivery apps and ride marketplaces were the first big users. In a 2018 DoorDash Engineering post, the dispatch team noted that switchbacks began in dairy cow trials. It switched delivery pricing every 30 minutes, with regions at roughly city level randomized on their own (checked Dec 2026).

When Is a Sitewide AB Test Unsafe to Split by User?

A sitewide AB test is unsafe to split by user in three situations. Shoppers can see both versions, one arm changes what the other arm gets, or the split itself feels unfair. In those cases a user split measures a mix of both versions, not the difference between them.

Three ecommerce cases come up most often.

Free shipping threshold

A threshold lives in banners, emails, ads, the cart and customer service scripts. Shoppers share screenshots and compare carts across devices. If half of them see $60 and half see $75, many will see both, and the control is no longer a clean $75 world. Cost is also the main reason people leave. Baymard’s cart abandonment research ranks extra costs such as shipping, tax and fees as the top reason (updated Oct 2026, checked Dec 2026). They drove 40% of shoppers who abandoned for a reason other than browsing. Another 12% left because they could not see or calculate the total cost up front.

Merchandising and sort order

A ranking rule that learns from clicks, or a rule that pushes low-stock items, works on one shared catalog. If the variant sells out a hero product faster, control shoppers see a different shelf. That is interference: the treatment changes the environment of the control group.

Pricing display

Showing two prices for the same item at the same moment can feel unfair, and it is easy to spot. A time split keeps every shopper on the same display at any given hour. For the commercial side of price tests, CustomFit.ai’s price AB testing guide covers offer structure and margin guardrails.

A related risk is a sitewide change that overlaps another live test. Our guide to running multiple AB tests at the same time explains how to check for interactions.

Switchback Experiment vs Geo Experiment: Which Should You Use?

Use a switchback experiment when the change must apply to every shopper at once and its effect fades within hours or a day or two. Use a geo experiment when you can treat whole regions separately, such as a regional delivery promise or local ads. Use a plain user split for page-level changes that do not leak.

Google’s geo experiment paper by Vaver and Koehler (2011) describes randomly assigning non-overlapping regions to control or treatment (checked Dec 2026). The weakness is count. Most stores have only a few dozen usable regions, so error bars stay wide.

DesignUnit randomizedWorks well forWatch out for
User splitShopper or sessionCopy, layout, page featuresLeakage across devices and shared state
Switchback experimentTime block for the whole storeShipping rules, price display, merchandisingCarryover and day-to-day noise
Geo experimentRegionRegional offers, ads, delivery promisesFew units and regional differences
Pre/post comparisonNoneLast resort onlySeasonality and campaigns look like effects
Comparison table for switchback testing showing user split, switchback and geo experiment designs by randomized unit, exposure, best use, main risk and analysis unit
Use a user split for page changes, switchback testing when one sitewide state must apply to every shopper at once, and a geo experiment when regions can be treated separately.

How Do You Run a Switchback Experiment on a Store?

To run a switchback experiment, pick a block length that matches how long the change lingers, randomize the order of blocks, and analyze blocks rather than sessions. Write down your washout rule and your main metric before day one, not after you see the data.

  • 1. Size the carryover. Check how long shoppers take to return to a saved cart. If most return within a day, a one-day carryover is a fair guess.
  • 2. Pick the block. Bojinov and coauthors found the optimal design re-randomizes about once per carryover length. For most stores that means one or two days. Switch at a quiet hour, such as 3 AM store time.
  • 3. Randomize the order. Flip a coin per block, or shuffle equal counts of A and B. A fixed ABAB pattern can line up with weekends.
  • 4. Wash out switch days. Exclude the first day after every change of arm.
  • 5. Analyze by block. Compare the average daily metric across arms, with days as the unit.

DoorDash took the same approach. It analyzed time and region units with a simple average. In its A/A tests, a robust sandwich variance estimator changed the variance by under 10%.

Five-step process for switchback testing on an ecommerce store, from sizing the carryover and block length to washout days and a day-level analysis
To run switchback testing on a store, set blocks about as long as the carryover, randomize their order, drop switch days, and analyze days instead of sessions.

Read more: Sample Ratio Mismatch (SRM): How to Detect and Fix It

What Is the Carryover Effect in a Time Split Test?

The carryover effect is the part of the old version that keeps acting after a switch. In a time split test, a shopper who built a cart under a $60 threshold may come back the next day and meet $75. That visit belongs to the new block, but it still reflects the old one.

Carryover is not the same as a novelty effect, where a change works at first and then fades. Our guide to the novelty effect in AB testing covers that pattern. Carryover pulls both arms toward each other, so it shrinks the measured gap.

Worked example: a $75 vs $60 free shipping threshold

We built an apparel store model to show the size of the problem. Control (A) uses a $75 threshold. Treatment (B) uses $60. The test runs 28 days in 14 two-day blocks, seven of each, in random order. Every day, 30% of shoppers are returning from the previous day and act under that day’s version.

In the model, control converts at 2.40% with a $72.00 average order. Revenue per visitor is 0.024 x $72.00 = $1.728. Treatment lifts conversion by 7% to 2.568% and trims the average order by 2.5% to $70.20. Its revenue per visitor is $1.80274. The true lift is 1.07 x 0.975 = 1.04325, or 4.33%.

Now add carryover. On the first day of a B block after an A block, 70% of shoppers act under B and 30% under A. Revenue per visitor is 0.7 x $1.80274 + 0.3 x $1.728 = $1.7803. The first day of an A block after a B block gets 0.7 x $1.728 + 0.3 x $1.80274 = $1.7504.

In our random schedule, 5 of the 14 days in each arm followed a switch.

  • Control average: (9 x $1.728 + 5 x $1.7504) / 14 = $1.7360.
  • Treatment average: (9 x $1.80274 + 5 x $1.7803) / 14 = $1.7947.
  • Measured lift: $1.7947 / $1.7360 = 1.0338, or 3.38%.

Carryover hid 22% of the real effect. Drop the 10 switch days, and both arms return to clean days, so the estimate is 4.33% again. The cost is data: only 18 of 28 days remain.

The threshold also costs money. In the model, 15.8% of treatment orders fall between $60 and $75 and now ship free. At $7.50 per label, that is 0.02568 x 0.158 x $7.50 = $0.0304 per visitor. Net revenue per visitor is $1.80274 minus $0.03040, or $1.77234, a net lift of 2.57%.

Bar chart for switchback testing showing a 4.33% true lift, 3.38% when all days are analyzed, 4.33% after washout and 2.57% after extra shipping cost
In our $75 vs $60 threshold model, carryover cut the measured lift from 4.33% to 3.38%, a washout restored it, and extra shipping cost left a 2.57% net gain.

We then ran 4,000 random schedules with daily traffic and conversion noise, with and without a real effect.

Analysis choiceAverage lift (true 4.33%)False positives with no effect
All days, day as the unit3.79%4.48%
Washout days, day as the unit4.55%4.98%
Washout days, session as the unit4.55%9.80%

The washout removed most of the bias. The session row is the trap. Shoppers on the same day share the same weather, email send and ad budget, so they are not independent.

Plan Your Switchback Schedule Before Launch

Fix the block length, the washout rule and the primary metric before the first switch. Use every CustomFit.ai feature free for 14 days.

Start Free Trial No credit card required

How Long Should a Switchback Test Run?

A switchback test should run long enough to collect enough blocks, not enough sessions. With daily blocks, your sample size is the number of clean days. That number is small, so switchbacks suit large changes or long tests.

In our model, daily revenue per visitor had a standard deviation of about $0.195 around a $1.73 mean. Assume 9 clean days per arm, 80% power and 5% significance. The smallest lift you can reliably detect is about 2.8 x $0.195 x the square root of 2/9 = $0.257. That is 14.9% of revenue per visitor. Our guide to the minimum detectable effect explains the formula.

Test lengthPower to detect the 4.33% lift
28 days12.4%
56 days20.7%
84 days30.6%
112 days40.3%

Each row is 2,000 simulated runs with washout days removed. Even 16 weeks missed the 4.33% lift more often than not. There are three ways to shorten that. Test a bolder change, use shorter blocks if the carryover lasts only hours, or adjust for weekday and traffic. CustomFit.ai’s guide on how long to run an AB test covers calendar effects for ordinary splits too.

When Should You Use Switchback Testing? A 7-Point Checklist

Use switchback testing when most of these seven checks are true. If only one or two apply, a normal user split is faster and has far more power.

  • 1. The change is sitewide and must look the same to every shopper at a given hour.
  • 2. A user split would leak through banners, emails, shared carts or support chats.
  • 3. One arm would change what the other arm sees, such as stock levels or a learning sort.
  • 4. The effect fades within hours or a day or two, so a short washout can clear it.
  • 5. You can switch on a schedule and log which arm was live each hour.
  • 6. You can run at least four weeks, or the expected change is large.
  • 7. No big sale, launch or holiday falls inside the test window.

If checks 4 or 6 fail, consider a geo experiment or a long holdout instead.

Pick One Sitewide Rule and Start Testing

Begin with a shipping threshold or a price display, and lock a two-day block schedule. Try CustomFit.ai free for 14 days, cancel anytime.

Try CustomFit.ai Free No credit card required

Summary

Switchback testing randomizes time blocks for the whole store, so it fits sitewide rules that cannot be split by shopper. The main pitfall is carryover. In our model it hid 22% of a free shipping win until we dropped the switch days. Analyze days, not sessions, and plan for few units, because daily noise sets your power.

FAQs

Is switchback testing the same as a before and after test?

No. A before and after test runs one version, then the other, once, so a campaign or a holiday can look like an effect. A switchback test randomizes many blocks back and forth by coin flip. That randomization spreads weekdays, weather and promotions across both arms, which is what makes the comparison causal.

Can a small store run a switchback test?

Yes, but it will need a large change or a long test. Power depends on the number of clean blocks, not the number of sessions, and daily revenue is noisy for small stores. If you expect a lift under 10%, a user split on a page-level change, or a qualitative check, will usually teach you more.

What metric should a switchback test use?

Use a daily metric that captures the full trade-off, usually revenue per visitor or gross margin per visitor. Add conversion rate and average order value as companions. For a shipping test, subtract the extra shipping cost from each treatment day. More orders at a lower threshold can still cost you money after you pay for the extra labels.

Can a switchback test and a geo experiment run together?

Yes. DoorDash randomized each region separately within each time window, so every region and time slot became its own unit. For a store, that can mean switching a delivery promise by country or state on separate schedules. More units mean tighter error bars, as long as shoppers rarely cross regions.

What if a holiday lands inside a switchback test?

Keep the days in the data if the holiday was planned, and check that both arms got a fair share of them. If one arm got most of the holiday traffic, report the result with and without those days. For big events such as Black Friday, pause the test or plan around the date.

Read more:

Leave a Comment

Your email address will not be published. Required fields are marked *