Making an online shop better every month: the improvement loop

TL;DR

Difficulty: Advanced

Improve a shop with one monthly loop, not a string of projects.

  • Find the constraint: the lever with the most value, room and evidence (the theory of constraints applied to the KPI tree).
  • Write a hypothesis that can fail, then rank ideas by expected value per developer day, not by ICE scores.
  • Build every change behind a flag, measure it against a random group, decide by a rule written in advance.
  • Shrink every win (the winner's curse) and check the year's sum with a 10% global holdout.
  • In the worked example, eleven tests and five wins take monthly profit from €5,431 to €11,003.

Most shops improve by accident: an app here, a redesign there, and nobody can say afterwards what earned money. This chapter turns improvement into a monthly loop, from the constraint to a measured, recorded result, and works through a full year for an example shop, including every test that failed.

How do I make my shop better every month, on purpose?

Most online shops do improve. They just improve by accident. Someone reads an article about trust badges, someone else installs an app that promises more conversions, the agency proposes a new homepage, and a year later the shop is different. Whether it is better, and which of the changes made it better, nobody can say.

This chapter is about doing it on purpose. It describes one loop that a shop runs every month: find the one place where the shop is held back, write down what you expect a change to do, build the change so that it can be switched on and off, measure what it really did, decide, and write the result down. Then start again. Every chapter in this programme feeds into it, which is why it comes last.

The loop is simple to draw and hard to keep, so most of this chapter is about the parts that make it hold. It finishes with a complete worked year.

Two chapters are worth reading first. The KPI tree breaks profit into the levers the loop pulls. Measuring features in isolation shows how one part of a shop is switched off for a random share of visitors to see what it earns. This chapter builds the routine around both.

Example: Shannonside Home's year without a loop

Shannonside Home is an invented online homeware shop in Limerick (shannonsidehome.example). It sells ceramics, kitchen textiles, lamps and small furniture, about 1,400 products. Niamh owns it, and Callum is her developer. These are the example's monthly figures, the same in every chapter of the programme:

NumberPer month
Sessions110,000
Conversion rate1.8%
Orders1,980
Average order value (AOV), including VAT, after discounts, excluding delivery€84
Contribution per order before marketing€22.44
Contribution before marketing€44,431
Ad spend€16,500
Fixed costs€22,500
Profit€5,431

Contribution is what an order leaves behind after every cost it causes: the goods, the payment fee, picking, packing and postage, and the expected cost of a return. The unit economics chapter works the €22.44 out line by line. Profit is contribution minus ads minus fixed costs: 44,431−16,500−22,500=5,43144{,}431 - 16{,}500 - 22{,}500 = 5{,}431.

Last year Niamh changed a good few things: a new homepage, a reviews app, a pop up offering 10% off, a new filter layout. Revenue went up a little, and so did the ad budget and a few supplier prices. She cannot say which change earned money, which cost money and which did nothing. That is not a failure of effort. It is the absence of a loop.

The improvement loop in six steps

The loop has six steps, and each one answers one question:

  1. Find the constraint. Where is the shop held back most, right now?
  2. Write a hypothesis. What exactly changes, for whom, and which number should it move, by how much?
  3. Rank by expected value. Of all the ideas, which is worth most per day of work?
  4. Build behind a flag. Can the change be switched on for some visitors and off for others?
  5. Measure in isolation. What did the change do, compared with a random group that did not get it?
  6. Decide and register. Ship, remove or extend, and write the result where everyone can find it.

The register feeds the next turn: how often your ideas really win, how big real effects are, and what has already been tried.

Tap or click to open full screen and move around

Example: one turn of the loop at Shannonside

In January Niamh and Callum sit down for their first monthly review. The KPI tree shows conversion on product pages as the weakest link compared with similar shops, and the customer service inbox, which lives in the shop's own database, shows something specific: of 410 customer emails in January, 118 (29%) asked when an order would arrive.

  1. Constraint: visitors on product pages do not know when the item will arrive, so they leave or write in.
  2. Hypothesis: showing "Order in the next 3 hours for delivery on Thursday" on every product page will lift conversion by about 3%, measured per session, with no rise in late deliveries.
  3. Expected value: about €4,300 over a year after the cost of building it (worked out in step three below).
  4. Build: Callum writes the delivery date calculation and puts it behind a flag. Half of the visitors see it, half do not.
  5. Measure: two months, both halves compared on conversion and on contribution per session, with late deliveries as a guardrail.
  6. Decide and register: the test shows a clear win. It ships, and the register records the effect at a size the next sections explain.

That is one turn. The rest of the chapter takes each step apart.

Step one: find the constraint

A shop is a chain. Visitors arrive, find a product, decide, pay, get the parcel, keep it or send it back, and maybe come again. Profit is limited by the weakest link in that chain, and improving any other link changes very little. This is the central idea of the theory of constraints.

What the theory of constraints says

Eliyahu Goldratt set the idea out in 1984 in a business novel, The Goal, written with Jeff Cox, about a factory manager trying to save his plant.1 The plant is full of busy machines and still ships late, because the output of the whole plant is set by its slowest step. An hour lost at that bottleneck is an hour lost for the whole plant. An hour saved anywhere else does not move the plant's output at all.

Goldratt later wrote the method down as five focusing steps, which the 30th anniversary edition of the book added to the story:1 2

  1. Identify the constraint.
  2. Exploit it: get the most out of the constraint with what you already have, before you buy more of it.
  3. Subordinate everything else to it: the other steps work at the pace of the constraint, not faster.
  4. Elevate it: if it is still the constraint, add capacity.
  5. Repeat: once the constraint moves somewhere else, go back to the first step, and do not let habit become the next constraint.

In a shop the constraint can be physical (how many parcels can be packed in a day), it can be the market (not enough of the right people arrive), or it can be a rule the business made for itself, such as a delivery threshold or a returns policy.

Example: the December packing bottleneck

In an ordinary month Shannonside ships about 66 orders a day. Two people pack, each working 450 minutes a day at 8 minutes per order, so the packing bench can do 2×450÷8=1122 \times 450 \div 8 = 112 orders a day. In the three weeks before the last posting date for Christmas, demand runs at about 145 orders a day.

The constraint is the packing bench, not the website. More traffic would only lengthen the queue, and an order that misses the last posting date is, for most gift buyers, an order they would rather not have placed. So Niamh walks the five steps:

  1. Identify: 33 orders a day more than the bench can pack. Over 15 peak days that is 495 orders at risk, worth 495×22.44=11,108495 \times 22.44 = 11{,}108 euro of contribution.
  2. Exploit: Callum changes the pick list so that orders are batched by shelf, and the 20 best selling gift items are packed in advance in their boxes during November. The average falls from 8 to 6 minutes, and the bench can now do 2×450÷6=1502 \times 450 \div 6 = 150 orders a day.
  3. Subordinate: the ad budget for the peak weeks is capped at the level that brings about 150 orders a day. Buying traffic the bench cannot ship is money spent on complaints.
  4. Elevate: only if the first three steps are not enough would a third packer be hired for December. They are enough, so she is not.
  5. Repeat: in January the constraint moves back to the website, and the loop goes with it.
Tap or click to open full screen and move around

Throughput, inventory and operating expense are numbers you already have

The Goal measures a business with three numbers.3 Throughput is the rate at which the business makes money through sales. Inventory is the money tied up in things it intends to sell. Operating expense is the money it spends to turn inventory into throughput. For a shop these map closely onto numbers from earlier chapters: throughput is contribution before marketing, inventory is your stock at cost, and operating expense is ads plus fixed costs.

So a change is an improvement only if it raises contribution, lowers the stock needed for the same sales, or lowers ads and fixed costs, without making another of the three worse by more. A discount that raises revenue on orders the shop would have had anyway is not one, however good the revenue chart looks.

Use the KPI tree to find the constraint in an ordinary month

Outside December the constraint is rarely a physical machine. It is a lever in the KPI tree that has the most room to move per euro of effort. The KPI tree chapter shows how to ask the tree what a 1% change in each lever is worth. That is half of the answer. The other half is how far each lever could realistically move: a lever that is worth a lot per point but is already as good as it gets is not the constraint.

So the monthly review asks three questions of each lever:

  • Value: what is a 1% change worth in euro of profit?
  • Room: how far is this lever from where it could be, judged by your own history, by your best categories and by honest outside reference points?
  • Evidence: what does the shop's own data say about why it is where it is (customer emails, search terms with no results, return reasons, drop off by checkout step)?

The constraint is the lever where all three point the same way.

Example: the 1% table for Shannonside

These are the profit effects of a 1% improvement in each lever at Shannonside, holding everything else equal, from a monthly profit of €5,431:

LeverChangeProfit per monthShare of profit
Sessions (without more ad spend)+1%+€444+8.2%
Conversion rate+1% relative (1.8% to about 1.82%)+€444+8.2%
Average order value, same costs per order+1%+€612+11.3%
Gross margin on product+1 point (52% to 53%)+€1,230+22.7%
Return rateminus 1 point (9% to 8%)+€911+16.8%
Fulfilment cost per orderminus 1%+€148+2.7%
Ad spend, same salesminus 1%+€165+3.0%

The sessions line is 1,980×1%×22.44=4441{,}980 \times 1\% \times 22.44 = 444. The order value line is larger than the conversion line because a bigger basket brings extra margin without an extra parcel. The return line is 1,980×1%×(10.50+35.51)=9111{,}980 \times 1\% \times (10.50 + 35.51) = 911, where €10.50 is the cost of handling a return and €35.51 is the gross profit lost on an average returned order.

Value alone would point at margin. But Niamh has already negotiated hard with her suppliers, and her prices sit at the market. The room is small. Conversion on product pages is lower than in her own best category (lamps convert at 2.6%, textiles at 1.4%), and the evidence is specific: 29% of customer emails ask about delivery dates. Value, room and evidence point at the same lever, so for January the constraint is conversion on product pages.

Step two: write a hypothesis you can lose

A hypothesis is a sentence that can turn out to be wrong. "A better product page will help" cannot be wrong, so it cannot teach you anything. A useful hypothesis names five things:

  • The evidence that makes you think so.
  • The change, precisely enough that someone else could build it.
  • Who sees it: all visitors, mobile visitors, first time customers.
  • The metric and the expected size, as a number.
  • The guardrails: numbers that must not get worse, even if the main one improves.

Writing the expected size down first is uncomfortable, and that is the point: it is a guess the register can check later.

Example: the delivery date promise

Niamh writes it into the register in this form:

Because 29% of January customer emails ask when an order will arrive, I believe that showing a delivery date on every product page ("Order in the next 3 hours for delivery on Thursday") will raise conversion per session by about 3% for all visitors. I will know after two months of a 50/50 test. Guardrails: the share of orders delivered after the promised date stays below 3%, and customer emails about delivery fall, not rise.

Every part of it can fail. The conversion lift might be zero. The promise might be wrong often enough to annoy people. Customers might write in more, not less, if a date slips. That is what makes it a hypothesis.

Step three: rank ideas by expected value

There are always more ideas than days to build them. The loop needs a way to choose, and the best one, once you have numbers, is expected value. The expected value of an idea is what it is worth on average, if you could try it many times: the gain if it works, weighted by the chance that it works, minus what it costs (Foundations: expected value):

EV=p⋅g⋅H−cEV = p \cdot g \cdot H - c

where EVEV is the expected value in euro, pp is the probability that the idea works as hoped, gg is the extra contribution per month if it does, HH is the number of months you count the gain for, and cc is the full cost: building, testing and, if it fails, removing it.

Because days of work are the scarce resource, rank by expected value per day (Foundations: ratios and rates):

v=EVdv = \frac{EV}{d}

where vv is the expected value per day of work and dd is the number of developer days the idea needs.

Where does pp come from? At the start, from outside evidence. In a public paper on experimentation at Microsoft, Ron Kohavi and colleagues report that only about a third of the ideas they tested improved the metric they were designed to improve, about a third made no significant difference, and about a third made it worse.4 That is a humbling base rate, and a good default. Raise pp above a third only when you have specific evidence, such as the 29% of emails behind the delivery promise. After a year, use your own register's hit rate instead.

Example: six ideas, priced in euro

Callum costs €520 a day. Niamh counts gains for twelve months (H=12H = 12), because most changes are redesigned or replaced within a year or two. These are her six candidates for the spring:

Ideappgg per monthDaysCost ccEVEVEVEV per day
Lamp and bulb bundle on lamp pages (hoped +3% order value)0.35€1,8353€1,560€6,147€2,049
Express checkout buttons in the basket (hoped +4% conversion)0.45€1,7775€2,600€6,996€1,399
Delivery date promise (hoped +3% conversion)0.40€1,3334€2,080€4,318€1,080
Stronger furniture packaging (hoped 4 points fewer damage returns)0.60€4062€1,040€1,883€942
Carrier chosen by parcel size (hoped 45c less per order)0.80€8916€3,120€5,434€906
New homepage (hoped +6% conversion)0.25€2,66620€10,400minus €2,402minus €120

Take the delivery promise line step by step. If it works, conversion rises 3%, so orders rise by 1,980×0.03=59.41{,}980 \times 0.03 = 59.4 a month, each worth €22.44, so g=59.4×22.44=1,333g = 59.4 \times 22.44 = 1{,}333 euro a month. The expected gain over twelve months is 0.40×1,333×12=6,3980.40 \times 1{,}333 \times 12 = 6{,}398. Four days cost 4×520=2,0804 \times 520 = 2{,}080. So EV=6,398−2,080=4,318EV = 6{,}398 - 2{,}080 = 4{,}318, and per day 4,318÷4=1,0804{,}318 \div 4 = 1{,}080.

The new homepage is the idea everyone loves. It is also the only one with a negative expected value: even if it worked, a 25% chance of €2,666 a month for a year is €7,998, less than the €10,400 it costs to build. That does not mean the homepage can never change. It means a full redesign is the wrong bet, and a small, testable change to the top of the homepage is a better one.

Bar chart of expected value per day of developer work for six invented ideas at Shannonside Home. Lamp and bulb bundle 2,049 euro a day, express checkout buttons 1,399, delivery date promise 1,080, furniture packaging 942, carrier chosen by parcel size 906, and the new homepage minus 120, the only idea that loses money on average. Tap or click to open full screen and move around

Why expected value beats ICE scoring once you have numbers

The most common alternative is ICE scoring, a method credited to the growth marketer Sean Ellis.5 Each idea gets a score from 1 to 10 for Impact, Confidence and Ease, and the scores are multiplied (some teams average them). ICE is quick, and when a shop has no numbers at all it is far better than the loudest opinion in the room.

Once you have a KPI tree, it has three weaknesses:

  • The scales are not money. An impact of 8 is not twice the profit of an impact of 4.
  • Multiplying scores invents precision. The gap between 6 x 5 x 7 and 7 x 6 x 6 looks like a ranking but rests on six guesses.
  • It cannot say no. Every idea gets a positive score. Expected value can come out negative, and then the answer is not to build it.

Example: the same six ideas with ICE

Niamh and Callum also scored the six ideas with ICE, as they had in the past:

IdeaImpactConfidenceEaseICEICE rankEVEV per day rank
Express checkout buttons76625212
Delivery date promise65721023
Lamp and bulb bundle55820031
New homepage96316246
Carrier by parcel size48516055
Furniture packaging36814464

ICE puts the new homepage fourth, ahead of two ideas that pay for themselves. Expected value puts it last, below zero. The bundle moves from third to first, because the arithmetic notices what the scores hid: a bigger basket brings margin without an extra parcel, and the idea costs three days.

The numbers in the expected value table are still guesses. The difference is that they are guesses in euro, written down, which the register can check later.

Measuring changes the expected value itself

There is a second reason to measure, and it is the strongest argument for the whole loop. If you ship ideas without testing them, the bad ones stay. If you test, the bad ones come out after the test. The two cases have different expected values (Foundations: expected value):

EVblind=(pw g−ph ℓ) H−cEVtested=pw g H−cEV_{\text{blind}} = (p_w \, g - p_h \, \ell) \, H - c \qquad\qquad EV_{\text{tested}} = p_w \, g \, H - c

where pwp_w is the probability the change helps, php_h the probability it harms, gg the monthly gain if it helps, ℓ\ell the monthly loss if it harms, HH the months counted and cc the cost. In the tested case the harmful third is removed after the test. The test period itself roughly cancels out: while it runs, the winners earn on half of the traffic about what the losers cost on the other half.

Example: shipping blind versus testing the delivery promise

Use Kohavi's thirds: pw=ph=1/3p_w = p_h = 1/3. Say the delivery promise either adds or costs 3% of conversion, so g=ℓ=1,333g = \ell = 1{,}333 euro a month, H=12H = 12 and c=2,080c = 2{,}080.

Shipped blind: (1/3×1,333−1/3×1,333)×12−2,080=0−2,080=−2,080(1/3 \times 1{,}333 - 1/3 \times 1{,}333) \times 12 - 2{,}080 = 0 - 2{,}080 = -2{,}080 euro. On average, the gains of the good ideas are eaten by the losses of the bad ones, and the build cost is lost.

Tested: 1/3×1,333×12−2,080=5,332−2,080=3,2521/3 \times 1{,}333 \times 12 - 2{,}080 = 5{,}332 - 2{,}080 = 3{,}252 euro.

The same idea, the same chance of working, and a difference of €5,332 in expected value, purely from being able to see the result and remove the change if it harms. Testing turns a coin toss into a one sided bet. The Microsoft paper gives a warning from the other side: when Office Online changed a rating system without such a test, responses fell by more than 80%, and it took eight months to detect, analyse and replace.4

Step four: build every change behind a flag

A change can only be measured if it can be switched on for some visitors and off for others, at random, at the same time. That is what a feature flag does: a switch in the code that decides which version a visitor gets. The experiments chapter shows the full build: random assignment by hashing, exposure logging and the checks that catch a broken split. In the loop, every change gets a flag by default, even the ones nobody plans to test. Removing a flag later costs minutes. Adding one to a live change after the numbers start to wobble costs far more.

The loop adds one thing on top: a global holdout. A small random share of visitors, here 10%, sees none of the year's changes. Every flag checks the holdout first. At the end of the year, the holdout is compared with everyone else, and that comparison measures the sum of all the changes at once, which no single test can do. Step six shows why that matters.

Shannonside runs on Ruby on Rails and Solidus, so this is ordinary application code. Flipper, an open source Ruby library for feature flags, answers the question "is this feature on for this visitor?" with Flipper.enabled?.6

# app/models/global_holdout.rb
require "digest"

# Ten in every hundred visitors see none of this year's changes.
# The year is part of the hash, so a new holdout is drawn each January.
module GlobalHoldout
  SHARE = 10

  def self.member?(visitor_id, year: Date.current.year)
    bucket = Digest::SHA256.hexdigest("holdout:#{year}:#{visitor_id}").to_i(16) % 100
    bucket < SHARE
  end
end

# app/models/visitor_features.rb
class VisitorFeatures
  def initialize(visitor)
    @visitor = visitor
  end

  # Every improvement asks the holdout first, then its own flag.
  def on?(feature)
    return false if GlobalHoldout.member?(@visitor.id)

    Flipper.enabled?(feature, @visitor)
  end
end

For the beginner: GlobalHoldout.member? turns a visitor's ID into a number from 0 to 99 in a way that always gives the same answer for the same visitor and year, so a visitor stays in or out of the holdout for the whole year. Ten of the hundred possible numbers are in. VisitorFeatures#on? is the one place every change asks "should this visitor see it?". It says no to holdout members, and otherwise asks Flipper. For Flipper to treat the visitor as an actor, the visitor object needs a flipper_id, which the experiments chapter sets up.

Example: what Callum builds for the delivery promise

Callum builds three pieces. A small service calculates the promised date from the item's stock location, the time of day, the packing cut off at 2pm and the carrier's transit time. The product page shows the line only when VisitorFeatures.new(visitor).on?(:delivery_promise) is true. And every order stores the date it was promised, so the guardrail (orders delivered after the promised date) can be read straight from the shop database when the carrier reports delivery.

He enables the flag for 50% of visitors with Flipper's percentage of actors setting. Holdout members never see it, whatever the percentage. The four days in the expected value table cover all of this, including the tests that run in Callum's test gate before release.

Step five: measure the result in isolation

In isolation means one change, compared with a random group that did not get it, over the same days. Not before and after, because the season, the ads and the weather all change between before and after. The features in isolation chapter explains the metric to use, contribution per visitor, and why "revenue from people who used the feature" is the wrong number. This section answers the question every smaller shop needs answered first: how big must an effect be before my traffic can see it?

What a shop of this size can detect

A test can only reliably detect effects above a certain size, the minimum detectable effect. Kohavi and colleagues give a rule of thumb for the sample size of each group at the usual 95% confidence and 80% power (Foundations: sample size):7

n=16 σ2Δ2⟺Δ=4 σnn = \frac{16 \, \sigma^2}{\Delta^2} \quad \Longleftrightarrow \quad \Delta = \frac{4 \, \sigma}{\sqrt{n}}

where nn is the number of sessions in each group, σ2\sigma^2 is the variance of the metric per session, and Δ\Delta is the smallest true difference the test will catch four times out of five. For a conversion rate cc, the variance per session is σ2=c (1−c)\sigma^2 = c\,(1 - c).

Example: Shannonside's detectable effects in one and two months

At a conversion rate of 1.8%, σ2=0.018×0.982=0.017676\sigma^2 = 0.018 \times 0.982 = 0.017676, so σ=0.1330\sigma = 0.1330.

A 50/50 test for one month puts 55,000 sessions in each group. Then Δ=4×0.1330÷55,000=0.532÷234.5=0.00227\Delta = 4 \times 0.1330 \div \sqrt{55{,}000} = 0.532 \div 234.5 = 0.00227, which is 0.23 percentage points. Relative to 1.8%, that is 0.00227÷0.018=12.6%0.00227 \div 0.018 = 12.6\%.

For two months, n=110,000n = 110{,}000, so Δ=0.532÷331.7=0.00160\Delta = 0.532 \div 331.7 = 0.00160, which is 8.9% relative.

This is the most important number in the chapter for a shop of Shannonside's size. A real 3% lift in conversion is worth €1,333 a month, and no test at this traffic can confirm it on its own. Only effects of roughly 9% or more show up clearly in two months. Expected results of 2% or 3% are normal for good ideas, so most good ideas will come back looking flat.

Four ways to measure more with the same traffic

The answer is not to give up on measuring. It is to measure differently:

  • Make bigger bets at the constraint. Small cosmetic changes have small effects. A change aimed squarely at the constraint, such as a delivery date where 29% of customers ask for one, has a better chance of a large effect.
  • Measure closer to the change. A change to the basket page affects checkout starts more than total conversion, and the metric closer to the change has less noise. Keep contribution per session as the deciding metric, and use the closer metric to see whether the change did anything at all.
  • Remove noise you can explain. Variance reduction methods such as CUPED use each visitor's behaviour before the test to explain part of the noise. The experiments chapter shows how.
  • Measure the sum, not only the parts. Twelve changes of 2% each cannot be seen one by one, but together they add up to 27%, which a global holdout can see. That is the subject of the next step.

Cost changes are a different case. When a change lowers a cost per order, such as a lower cost carrier for small parcels, the effect is close to certain and appears directly on the invoices, order by order. These changes do not need a visitor test, only a careful before and after on the cost itself, with the same parcels compared.

Step six: decide, and write it into the register

Decide by a rule written before the test starts, so that the result cannot bend the rule. Here are Shannonside's rules, using the 95% confidence interval of the effect on contribution per session (Foundations: confidence intervals):

ResultRuleWhat goes into the register
Whole interval above zero, guardrails fineShip itThe shrunk effect (see below), not the raw one
Whole interval below zeroRemove itThe loss, and what it taught
Interval includes zeroRemove it, unless it fixes a fault or a legal needZero, never a "probable win"
A guardrail breaksRemove it, whatever the main metric saysThe guardrail and by how much

The third row is the hard one. A flat test that "looked a bit positive" is the most tempting thing to ship and count. Shipping it can be fine (a fix for searches that return nothing is worth keeping whatever the test says), but counting it as a win is how a register drifts away from reality.

The winner's curse: why the sum of your wins is too big

Here is a trap that catches even large companies. You run many tests, and you ship the ones that came back clearly positive. But a test result is the true effect plus noise. The tests that came back clearly positive are, more often than not, the ones where the noise happened to push upwards. So the observed effects of your winners are, on average, bigger than their true effects. Minyong Lee and Milan Shen of Airbnb described this selection bias in 2018, under the name the winner's curse, and showed how to correct the total.8

A simple correction is to shrink each winner's observed effect towards zero, more strongly when the test was noisy (Foundations: confidence intervals):

θ^shrunk=k⋅θ^,k=τ2τ2+SE2\hat{\theta}_{\text{shrunk}} = k \cdot \hat{\theta}, \qquad k = \frac{\tau^2}{\tau^2 + SE^2}

where θ^\hat{\theta} is the observed effect, θ^shrunk\hat{\theta}_{\text{shrunk}} is the effect you record, kk is the shrinkage factor between 0 and 1, SESE is the standard error of the test, and τ\tau is the typical size of true effects in your shop, the spread you would see if you could measure every idea without noise. This assumes true effects are centred on zero, which fits the thirds above: as many ideas hurt as help. Start with τ\tau around 3% for conversion changes, and estimate it from your own register after a year.

Example: shrinking the delivery promise result

The two month test came back with conversion per session up 10.5%, with a 95% interval from +4.3% to +16.7%. A clear win.

The standard error of a two month test is the detectable effect divided by 2.8 (the 1.96 for 95% confidence plus the 0.84 for 80% power): 8.9%÷2.8=3.18%8.9\% \div 2.8 = 3.18\%. With τ=3%\tau = 3\%:

k=3232+3.182=99+10.1=0.471k = \frac{3^2}{3^2 + 3.18^2} = \frac{9}{9 + 10.1} = 0.471

So the register records 0.471×10.5%=4.9%0.471 \times 10.5\% = 4.9\%, not 10.5%. At Shannonside's volume that is 1,980×0.049×22.44=2,1771{,}980 \times 0.049 \times 22.44 = 2{,}177 euro a month. Niamh had hoped for 3%. The test confirmed the idea works, and the shrunk number is the honest estimate of how well.

A register that keeps the whole shop honest

The register is the memory of the loop: one row per change, with the hypothesis, the expected value, the result, the decision and the effect recorded. I put every release I make through a test gate and a release register, and the improvement register is the same idea applied to the business: nothing ships without its line, and every line can be checked later. In a Rails shop it is a small model:

# app/models/improvement.rb
class Improvement < ApplicationRecord
  enum :status, { idea: 0, testing: 1, shipped: 2, removed: 3, parked: 4 }

  validates :hypothesis, :metric, :expected_monthly_gain, :probability,
            :developer_days, :day_rate, presence: true

  # Expected value over the horizon, in euro.
  def expected_value(horizon_months: 12)
    probability * expected_monthly_gain * horizon_months - developer_days * day_rate
  end

  def expected_value_per_day
    expected_value / developer_days
  end

  # Shrink an observed relative effect towards zero (winner's curse).
  def shrunk_effect(observed:, standard_error:, tau: 0.03)
    k = tau**2 / (tau**2 + standard_error**2)
    observed * k
  end

  # This year's hit rate, to replace the one third default.
  def self.hit_rate(year = Date.current.year)
    decided = where(status: [:shipped, :removed]).where(decided_on: Date.new(year).all_year)
    return nil if decided.none?

    decided.where(counted_as_win: true).count.fdiv(decided.count)
  end
end

For the beginner: expected_value is the formula from step three, shrunk_effect is the winner's curse correction from this step, and hit_rate counts how many of this year's decided changes were real wins, so that next year's pp comes from your own shop rather than from Microsoft's.

A global holdout checks the sum

Shrinking is a correction. The global holdout is a measurement. Because 10% of visitors saw none of the year's changes, comparing them with the other 90% measures the combined effect of every shipped change, with all their interactions, in one number. If the register says the year's changes should add about 13% to contribution per session and the holdout says 2%, something in the loop is broken. If it says 10%, the register can be trusted.

The holdout has a price: for the whole year, 10% of visitors miss every improvement. It also needs enough traffic. For two groups of different sizes, the detectable effect becomes (Foundations: sample size):

Δ=2.8 σ1n1+1n2\Delta = 2.8 \, \sigma \sqrt{\frac{1}{n_1} + \frac{1}{n_2}}

where n1n_1 and n2n_2 are the sessions in the holdout and in the rest, and 2.8 again stands for 95% confidence and 80% power.

Example: Shannonside reads its holdout over the last three months of the year, when all the changes are live. The holdout has n1=33,000n_1 = 33{,}000 sessions and the rest n2=297,000n_2 = 297{,}000. Then 1/33,000+1/297,000=0.00003367=0.00580\sqrt{1/33{,}000 + 1/297{,}000} = \sqrt{0.00003367} = 0.00580, and Δ=2.8×0.1330×0.00580=0.00216\Delta = 2.8 \times 0.1330 \times 0.00580 = 0.00216, which is 12.0% relative to 1.8%. A combined effect of about 13% is just within reach. A single 3% change never would be. That is the whole reason for the holdout.

Small improvements compound

One improvement of 2% is easy to dismiss. The point is that improvements multiply. If each of nn improvements raises a number by the share gg, the number ends up multiplied by (Foundations: compounding):

M=(1+g)nM = (1 + g)^n

where MM is the final multiple, gg the improvement each time as a decimal and nn the number of improvements. Twelve improvements of 2% give 1.0212=1.2681.02^{12} = 1.268, an increase of 26.8%, a little more than the 24% you would get by adding them, because each improvement applies to a number the earlier ones already raised.

The effect on profit is larger still, because ads and fixed costs do not grow with contribution. The share by which profit changes is (Foundations: percentages):

ΔPP=ΔCC⋅CP\frac{\Delta P}{P} = \frac{\Delta C}{C} \cdot \frac{C}{P}

where PP is profit, CC is contribution before marketing, and ΔP\Delta P and ΔC\Delta C are their changes. The ratio C÷PC \div P is the shop's operating gearing: how many euro of contribution sit behind each euro of profit.

Example: twelve improvements of 2% each at Shannonside

Suppose Shannonside ships one improvement a month, each raising contribution per session by a true 2%, with ads and fixed costs unchanged.

  1. Contribution rises from €44,431 to 44,431×1.0212=44,431×1.2682=56,34944{,}431 \times 1.02^{12} = 44{,}431 \times 1.2682 = 56{,}349 euro a month.
  2. Ads (€16,500) and fixed costs (€22,500) stay the same, so profit rises from €5,431 to 56,349−16,500−22,500=17,34956{,}349 - 16{,}500 - 22{,}500 = 17{,}349 euro a month.
  3. Check with the gearing formula: C÷P=44,431÷5,431=8.18C \div P = 44{,}431 \div 5{,}431 = 8.18, so a 26.8% rise in contribution moves profit by 26.8%×8.18=219%26.8\% \times 8.18 = 219\%, and 5,431×3.19=17,3495{,}431 \times 3.19 = 17{,}349 (rounded).

Profit more than triples, from changes that are each too small to notice in a week of sales figures. This is why the loop is worth keeping in a quiet month.

Why the real year earns less than the arithmetic

The arithmetic assumes twelve true wins of 2%. A real year falls short of it for four reasons, and naming them in advance stops disappointment from killing the loop:

  • Most ideas do not win. With a hit rate of a third to a half, twelve tests bring four to six wins, not twelve.
  • Wins are smaller than they look. The winner's curse means the recorded effect after shrinking is often half the observed one.
  • The loop costs money. Developer days, and the holdout's 10% of visitors who miss every improvement.
  • Effects fade or collide. A novelty can wear off, and two changes that both help the same hesitant visitor do not add up fully. The holdout catches both, because it measures what is really left.

The worked year below includes all four, and it still more than doubles profit.

Line chart of invented monthly profit at Shannonside Home over twelve months. Without a loop profit stays at 5,431 euro. Twelve true improvements of 2% each would lift it month by month to 17,349 euro in December. The realistic worked year starts lower, at 3,351 euro in January, because the loop costs 2,080 euro a month before it pays, and climbs in steps as wins ship, to 11,003 euro in December. Tap or click to open full screen and move around

What owning the system adds to the loop

The loop can run on any platform, rented or owned. What changes is how much of it you can reach. Three things matter most, and they are the honest case for running a shop on its own code.

Data from every process

The loop finds constraints in data, and the most useful data is often operational: why customers write in, which carrier damages which products, how long packing takes, which searches find nothing, why things come back. In a shop where the order, the stock, the shipment, the return and the customer email all live in one database, as the one coherent system chapter describes, these questions are a query. Spread across a dozen apps, each with its own copy of part of the truth, they are a project. The chapter on automating shop operations shows how those processes get into the database in the first place.

Any change is possible

The constraint is not always where a platform expects you to change things. It may be the checkout, the delivery promise, the way returns are booked, or the price logic for a bundle. Rented platforms do allow a great deal through apps and extensions, and their rules are published. On Shopify, for example, checkout UI extensions for the information, shipping and payment steps are available only to stores on the Shopify Plus plan (Shopify developer documentation, checked 22 November 2026).9 That is a reasonable product decision for Shopify. For a loop whose constraint sits in the checkout, it decides which experiments a smaller shop can run at all. With your own code, the question is only whether the change is worth building.

Every part can be measured

A feature you wrote is a feature you can put behind a flag, for half of the visitors, with every exposure logged to your own tables. A feature provided by an app is often all or nothing: on for everyone or off for everyone, with its data in the app's reports. The features in isolation chapter goes into this in detail, and the chapter on where Rails and Solidus shine is fair about where a rented platform is enough.

Example: the furniture packaging test only an owned system could run

Shannonside's return reasons sit in the shop database next to each order's products and carrier. A query shows that furniture, about 8% of orders (158 a month), comes back damaged far more often than anything else. A stronger box costs €1.40 more per furniture order.

The test is randomised by order, not by visitor: when a furniture order is packed, the pick list says "standard box" or "reinforced box" at random. Over four months, 316 orders get each box. Damage returns are 20 of 316 (6.3%) with the standard box and 7 of 316 (2.2%) with the reinforced one. A two sided Fisher exact test gives a p value of about 0.02, so chance is an unlikely explanation.

The value per month is worked from the example's return cost: a returned furniture order costs €10.50 of handling plus the gross profit lost on it. A furniture order averages €210 including VAT, so €170.73 without VAT, and at 52% margin that is €88.78 of gross profit, so €99.28 per return.

  1. Returns avoided per month: 158×(0.063−0.022)=158×0.041=6.48158 \times (0.063 - 0.022) = 158 \times 0.041 = 6.48.
  2. Money saved: 6.48×99.28=6436.48 \times 99.28 = 643 euro.
  3. Extra packaging: 158×1.40=221158 \times 1.40 = 221 euro.
  4. Net gain: 643−221=422643 - 221 = 422 euro a month.

Not a large number. But it came from data that a shop only has when packing, returns and products share one database, and from a randomisation that a shop can only run when it writes its own pick lists.

The monthly rhythm

A loop that depends on someone remembering does not survive March. It needs a fixed rhythm, short enough to keep:

WhenWhatWhoTime
First Monday of the monthReview: read the KPI tree snapshot, check running tests and guardrails, read finished results, update the registerOwner and developer90 minutes
Same meetingChoose: name the constraint, write or update hypotheses, rank by expected value per day, pick what to buildOwner and developerin the 90 minutes
Weeks 1 and 2Build behind flags, through the test gate, start testsDeveloperabout 4 days a month
Every MondayGuardrail check only: nothing on fire, split still 50/50, no broken trackingDeveloper15 minutes
End of each testDecide by the written rule, shrink, registerOwner30 minutes
Every quarterRecalibrate: hit rate, typical effect size τ\tau, the holdout trendOwner and developer2 hours
Every JanuaryRead the global holdout, release it, draw a new one, reset the yearOwner and developerhalf a day

Two tests at a time is usually what a shop of Shannonside's size can run, on different pages and split independently, so that each visitor is randomly in or out of each test. The experiments chapter explains how to check that two tests do not distort each other.

The snapshot that opens the review should not be built by hand each month. A recurring job builds it on the first of the month, from the orders in the shop's own database. Solidus marks completed orders with a completed_at time and provides a completed_between scope on Spree::Order.10 Rails 8 runs recurring jobs with Solid Queue, configured in config/recurring.yml.11

# app/jobs/monthly_kpi_snapshot_job.rb
class MonthlyKpiSnapshotJob < ApplicationJob
  queue_as :reports

  def perform(month = Date.current.prev_month)
    range  = month.beginning_of_month.beginning_of_day..month.end_of_month.end_of_day
    orders = Spree::Order.completed_between(range.begin, range.end)

    KpiSnapshot.create!(
      month:            month.beginning_of_month,
      orders:           orders.count,
      gross_revenue:    orders.sum(:total),
      sessions:         TrafficImport.sessions_for(range),     # from your analytics export
      contribution:     ContributionReport.new(orders).total,  # the unit economics model
      returns:          Spree::CustomerReturn.where(created_at: range).count,
      shipped_changes:  Improvement.shipped.where(decided_on: range).count
    )
  end
end
# config/recurring.yml
production:
  monthly_kpi_snapshot:
    class: MonthlyKpiSnapshotJob
    schedule: "0 6 1 * *"   # 6am on the first day of every month

For the beginner: the job counts last month's completed orders and revenue straight from the shop's tables, adds sessions and contribution, and saves one row. The YAML file tells Solid Queue to run it at 6am on the first of every month, so the review starts with numbers, not with someone building a spreadsheet. TrafficImport and ContributionReport stand for the shop's own classes; the chapter on the shop database as the source of truth shows where such numbers come from.

Example: a March review at Shannonside

On Monday 1 March the snapshot is waiting. The delivery promise test is in its second month: split 50.1% to 49.9%, late deliveries at 1.4% against a guardrail of 3%, so it runs on. The carrier change from January has been on the invoices for a full month: €7.05 per order instead of €7.50, so the register records €891 a month. Niamh and Callum rank the spring ideas by expected value per day, start the search rescue test, and plan the furniture packaging test for April. Ninety minutes, and everyone knows what happens next.

A full worked year for Shannonside Home

Here is the whole year, with every test, including the ones that failed. All numbers are invented for the example and follow the rules above: two month tests for conversion changes, the decision rule from step six, effects shrunk with τ=3%\tau = 3\% for conversion and τ=2%\tau = 2\% for order value, and a 10% global holdout throughout.

Example: the year, test by test

MonthsChangeConstraintHow measuredObserved (95% interval)DecisionCounted per month
JanCarrier chosen by parcel sizeFulfilment costInvoices, same parcels before and after45c less per orderKeep€891
Feb to MarDelivery date promiseProduct page conversionA/B, conversion per session+10.5% (+4.3% to +16.7%)Ship, count +4.9%€2,177
Mar to AprRescue page for searches with no resultsProduct findingA/B, conversion per session+2.1% (minus 4.1% to +8.3%)Keep as a fix, count zero€0
Apr to MayReviews shown next to the priceProduct page conversionA/B, conversion per session+1.0% (minus 5.2% to +7.2%)Remove€0
Apr to JulReinforced furniture boxDamage returnsRandomised by orderDamage returns 6.3% to 2.2%Keep€422
May to JunLamp and bulb bundleOrder valueA/B, order value+4.6% (+0.7% to +8.5%)Ship, count +2.3%€1,407
Jun to JulSmaller new homepage topHomepage conversionA/B, conversion per sessionminus 9.4% (minus 15.6% to minus 3.2%)Remove€0
Jul to AugExpress checkout buttons in the basketCheckout completionA/B, conversion per session+9.0% (+2.8% to +15.2%)Ship, count +4.2%€1,866
Sep to OctFree delivery threshold from €50 to €60Order valueA/B, contribution per sessionminus 1.5% (minus 8.6% to +5.6%)Keep €50€0
Sep to NovSecond order email for first time customersRepeat purchase20% of new customers held out60 day repeat rate +3.0 points (+0.8 to +5.2)Ship, count +1.9 points€554
Oct to NovNew filter layout on category pagesProduct findingA/B, conversion per session+3.0% (minus 3.2% to +9.2%)Remove€0
Nov to DecQuick view on category pagesProduct findingA/B, conversion per sessionminus 2.4% (minus 8.6% to +3.8%)Remove€0

Eleven tests, five clear wins, five flat and one loss. A hit rate of 45% is better than Kohavi's third, because every idea was chosen at the constraint and ranked by expected value. It is not a rate to expect in your first year.

How the counted gains were worked out:

  • Carrier: 1,980×0.45=8911{,}980 \times 0.45 = 891 euro.
  • Delivery promise: 1,980×0.049×22.44=2,1771{,}980 \times 0.049 \times 22.44 = 2{,}177 euro.
  • Furniture box: €422, from the example above.
  • Bundle: order value up 2.3% after shrinking, which raises contribution per order by €0.7104 (extra margin, a slightly higher payment fee and a slightly higher return cost on the larger basket), so 1,980×0.7104=1,4071{,}980 \times 0.7104 = 1{,}407 euro.
  • Express checkout: 1,980×0.042×22.44=1,8661{,}980 \times 0.042 \times 22.44 = 1{,}866 euro.
  • Second order email: 1,300 new customers a month, 1.9 points more of them ordering again within 60 days, so 1,300×0.019×22.44=5541{,}300 \times 0.019 \times 22.44 = 554 euro. The chapter on the first order to the second covers what goes into such an email, and the email chapter covers who may receive it.

The separate gains add up to €7,317. Calculated together, more orders at a higher contribution each, they come to €7,652, so the changes multiplying on each other add €335. The loop cost four of Callum's days a month, 4×520=2,0804 \times 520 = 2{,}080 euro.

Waterfall chart of the invented year at Shannonside Home. Monthly profit starts at 5,431 euro. The carrier change adds 891, the delivery date promise 2,177, the reinforced furniture box 422, the lamp and bulb bundle 1,407, the express checkout buttons 1,866 and the second order email 554. The changes multiplying on each other add 335. Four developer days a month cost 2,080. Monthly profit ends at 11,003 euro. Tap or click to open full screen and move around

At the end of the year, monthly profit is 5,431+7,317+335−2,080=11,0035{,}431 + 7{,}317 + 335 - 2{,}080 = 11{,}003 euro, up 103%. While the holdout runs, 10% of visitors miss the five customer facing wins, which costs about 10%×6,004=60010\% \times 6{,}004 = 600 euro a month. That money comes back in January, when the holdout is released.

Example: the holdout checks the register

The register predicts that the three changes visitors can see on the site (delivery promise, bundle and express checkout) raise contribution per session by about 12.7% together. Adding the raw observed effects instead would have predicted 24.1% (10.5+4.6+9.010.5 + 4.6 + 9.0).

In January, Callum compares the holdout with everyone else for October to December. Contribution per session is 9.6% higher outside the holdout, with a 95% interval from +1.0% to +18.2%. The interval contains the register's 12.7% comfortably, and it sits well below the raw 24.1%. The shrunk register was roughly right. The raw one would have promised Niamh twice what she got. She releases the holdout, a new 10% is drawn for the new year, and the loop starts again.

When the loop stalls

The loop rarely fails at the maths. It fails in the calendar:

SymptomCauseWhat keeps it away
Tests stop after two monthsResults were "only flat"Expect flat results; most good ideas are too small to see alone, and the holdout sees the sum
Every test is a cosmetic tweakIdeas are chosen by easeRank by expected value per day at the constraint
The register says the shop should be twice as profitableRaw effects were countedShrink every win, and check against the holdout
A change cannot be switched offIt was built without a flagEvery change behind a flag, by default
The review is skipped in busy monthsIt depends on someone building a reportThe snapshot job runs on the first of the month
The same idea comes back every springNobody wrote down the last resultEvery test, failures included, in the register

Conclusion

Making a shop better every month is a loop, not a project. Find the constraint with the KPI tree and the theory of constraints, write a hypothesis that can fail, rank ideas by expected value per day, build every change behind a flag, measure it against a random group, decide by a rule written in advance, and write the shrunk result into the register.

Three numbers keep it honest. The base rate, about a third of ideas winning, says why testing is worth more than shipping blind. The minimum detectable effect, about 9% in two months at Shannonside's traffic, says which changes a test can see on its own. And the global holdout measures the sum of everything that shipped, which is the only number that tells you whether the loop works. At Shannonside, a realistic year of eleven tests, five wins and one clear loss took monthly profit from €5,431 to €11,003.

Owning the system does not make the loop possible. It makes the whole of it possible: the data from every process, any change the constraint needs, and a flag on every part.

If you want this loop running in your own shop, with the KPI tree, the register and the flags built on your real data, book the free workshop: we find your constraint together, and the first two weeks of work are on me.

Sources

  1. 1.

    Eliyahu M. Goldratt and Jeff Cox, The Goal: A Process of Ongoing Improvement, The North River Press, first published 1984, 30th anniversary edition 2014 (adds the five focusing steps), https://northriverpress.com/the-goal-30th-anniversary-edition/

  2. 2.

    Theory of Constraints Institute, The Five Focusing Steps, a Process of On Going Improvement, https://www.tocinstitute.org/five-focusing-steps.html

  3. 3.

    Theory of Constraints Institute, The Goal summary and book review, chapter 8 (the three measurements), https://www.tocinstitute.org/the-goal-summary.html

  4. 4.

    Ron Kohavi, Thomas Crook, Roger Longbotham, Brian Frasca, Randy Henne, Juan Lavista Ferres and Tamir Melamed, Online Experimentation at Microsoft, public version of a Microsoft ThinkWeek paper, 2009, https://ai.stanford.edu/~ronnyk/ExPThinkWeek2009Public.pdf

  5. 5.

    Itamar Gilad, Product Discovery With ICE and The Confidence Meter, itamargilad.com, https://itamargilad.com/the-tool-that-will-help-you-choose-better-product-ideas/

  6. 6.

    Flipper, Features (documentation), flippercloud.io, https://www.flippercloud.io/docs/features

  7. 7.

    Ron Kohavi, Roger Longbotham, Dan Sommerfield and Randal M. Henne, Controlled experiments on the web: survey and practical guide, Data Mining and Knowledge Discovery, volume 18, pages 140 to 181, 2009, section 3.2, https://ai.stanford.edu/~ronnyk/2009controlledExperimentsOnTheWebSurvey.pdf

  8. 8.

    Minyong R. Lee and Milan Shen, Winner's Curse: Bias Estimation for Total Effects of Features in Online Controlled Experiments, Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD 2018), pages 491 to 499, https://www.kdd.org/kdd2018/accepted-papers/view/winners-curse-bias-estimation-for-total-effects-of-features-in-online-contr

  9. 9.

    Shopify, Checkout UI extensions, Shopify developer documentation, checked 22 November 2026, https://shopify.dev/docs/api/checkout-ui-extensions

  10. 10.

    Solidus, core/app/models/spree/order.rb (the complete and completed_between scopes), GitHub, https://github.com/solidusio/solidus/blob/main/core/app/models/spree/order.rb

  11. 11.

    Rails, Solid Queue, README section on recurring tasks, GitHub, https://github.com/rails/solid_queue