Guardrail metrics: what to watch in every A/B test

Guardrail metrics are the numbers an A/B test must not make worse. Pick them by page type, set the limit before launch and report rare events as counts.

· 10 min read

Guardrail metrics are the numbers in an A/B test that must not get worse while the primary metric decides the result. Pick one or two for each test, based on what the change could harm. Then write down before launch how much worse each may get and what happens if it crosses that line. Report rare events such as refund requests or chargebacks as counts, not only as percentages.

Optimize Peak’s test cards call this field “What to watch”. Its guide to reading a test describes it as a second number that must not get worse, which testers call a guardrail metric. Choosing the primary metric itself, and deciding who is counted, is covered in how to choose an A/B test primary metric. This post starts where that one stops.

What a guardrail metric is

A guardrail metric tracks a loss that the primary metric can’t see. Spotify’s experimentation team separates the two kinds of metric by intent (Confidence by Spotify). Success metrics are the ones you want to improve, and guardrail metrics are the ones “you don’t want to harm”.

An Optimize Peak test's details: what to watch is checkout completion rate, with the reason it could get worse.
What to watch in a real test card: the metric and why the change could hurt it. From Optimize Peak's example tests.

The primary metric tells you whether the change worked. The guardrail tells you whether it cost you something elsewhere.

Some teams call these counter metrics. The name matters less than the rule attached to it. A guardrail with no limit written down is just another chart that someone explains away after the test.

A guardrail also differs from a secondary metric you watch out of interest. PostHog describes guardrails as a subset of secondary metrics that generally watch for negative impact (PostHog). A secondary metric can move either way without changing the decision. A guardrail is part of it: if it breaks its limit, Variant B doesn’t ship, however good the primary metric looks.

Keep the list short. Each guardrail you add is one more chance of a false alarm when the change did nothing. PostHog puts that risk at about 14% with three guardrails and 40% with ten, each tested at a 0.05 significance level.

Two layers keep the list short without leaving the site unprotected. Microsoft’s experimentation team recommends a core metric set, guardrails included, computed for every experiment in a product so that regressions are always caught (Microsoft Research). Site-wide checks such as page load time and error rates belong in that core set. The test card then carries only the one or two guardrails tied to this particular change.

Guardrail metrics by page type

Each page type has its own way of hiding a loss behind a win. A pushier product page can raise the add-to-cart rate and also bring orders that come back. A shorter sign-up form can raise sign-ups and fill the account list with people who never start.

Page type Primary metric (example) What to watch The loss it catches
Landing page Lead form submissions Qualified lead rate More leads, fewer worth a call
Homepage Clicks to key pages Revenue per visitor Clicks moved, not added
Sign-up form Completed sign-ups Activation within 7 days Accounts that never start
Pricing page Trial starts Trial-to-paid rate Trials that never pay
Product page Add-to-cart rate Return rate Orders that come back
Cart Average order value Checkout completion rate Bigger carts, fewer orders
Checkout Order completion rate Payment error rate Orders that fail at payment
App onboarding Step completion Day-7 retention Skipped steps, early drop-off

In every row, the guardrail sits later than the primary metric, either further down the funnel or further along in time. A primary metric that counts an action needs a guardrail that counts what the action was for. The cart and product page rows match two of Optimize Peak’s example tests, a free-shipping bar and a warranty line. The primary metrics in the table are examples only.

How to pick the guardrail for one change

Start from the hypothesis. A hypothesis says why the change should work, and the mechanism behind it also points to the side effect worth watching. The A/B test hypothesis examples post gives filled templates by page type. Read the “why” part of yours and ask what else that same push could do.

  • Urgency or scarcity, such as a low-stock line: watch return rate or cancellations. Rushed orders can come back.
  • Fewer form fields or a shorter sign-up: watch activation or lead quality. Less friction can also let in people who never meant to use the product.
  • Price or discount wording: watch margin per order or refund rate. A bigger discount can raise orders and lower what each one earns.
  • Moving attention to a new path, such as a bigger banner: watch the path people came from, or revenue per visitor. Spotify’s own example is engagement that shifts from one section to another.
  • Extra weight on the page, such as video or a new script: watch page load time and error rate.

Count the guardrail for the same people as the primary metric. If the primary metric counts shoppers assigned to the test who open the cart, the guardrail counts those same shoppers in both arms. Compare people by the group they were assigned to, not by whether they noticed the change.

A return or a refund request can come weeks after the order. Count return rate only for orders whose return window has closed, in both arms. An order placed on the last day of the test hasn’t had time to come back, so it can’t count as a kept order yet. Write the follow-up period on the test card, for example 30 days after the last counted order.

Set the limit and the stop or ship rule before launch

The limit is the amount of harm you’ll accept, written down before any data comes in. Spotify’s Confidence glossary calls it a non-inferiority margin. It defines that as the largest drop in a guardrail a team will accept in exchange for a gain on the success metric (Confidence glossary). The same page calls it a product decision with no purely statistical answer.

Set the limit in units that map to real harm: percentage points, milliseconds or counts. As the glossary points out, a drop of 0.5% means something different for a metric near 80% than for one near 2%. The limit also has to be large enough for your sample to detect. If it’s smaller than the effect your test can detect, you’ll rarely be able to show the change is safe.

Spotify’s guide describes two ways to test a guardrail. An inferiority test ships the change unless there is evidence of harm. It needs no limit, but a test that’s too small can miss real harm, so “no harm found” may only mean “too little data”. A non-inferiority test ships only with evidence that the harm is smaller than your limit, and the guide calls it the better guard against deterioration.

Then write the decision rule on the test card, in this order:

  1. Primary metric. Variant B ships only if the primary metric is higher at the significance level you planned.
  2. Guardrail. Variant B ships only if the 95% interval for B minus A stays entirely above the limit.
  3. Unclear guardrail. If the interval crosses the limit, B doesn’t ship as a winner. Rerun with more traffic, or accept the risk in writing.
  4. Early stop. Stop at once only for breakage, such as payment errors far above A or a page that fails to load. Don’t stop early because the primary metric looks good.
  5. Read date. Name the date you read the result, after full weeks, and the later date for slow guardrails such as returns.

Spotify publishes a rule of the same shape. It ships only if a success metric is significantly better, every guardrail is significantly non-inferior and no metric shows deterioration (Spotify Engineering).

The team’s paper adds a cost. Guardrails tested this way need no adjusted significance level, but the power-side error rate must be corrected (arXiv paper). Each extra guardrail therefore asks for more traffic.

Hypothetical example: a free-shipping bar and checkout completion

A free-shipping bar in the cart makes a useful hypothetical example, and every figure in it is made up. The test mirrors the first of Optimize Peak’s example tests. The primary metric is average order value. What to watch is checkout completion rate, the share of shoppers who open the cart and then place an order, with a baseline of 38.0%.

Before launch, the team writes the limit: Variant B may be at most 1.5 percentage points below Variant A.

Showing that with 80% power at a 95% confidence level takes 16,438 shoppers per arm. That figure uses the normal approximation and assumes B is truly equal to A. The team rounds it up to 17,000 per arm.

The rule has three outcomes. B passes when the whole 95% interval for B minus A lies above −1.5 points. It fails when the interval lies wholly below, and it is unclear otherwise.

Outcome Variant A Variant B B minus A, 95% interval
Pass 38.0% 37.8% −0.2 pp (−1.2 to +0.8)
Unclear 38.0% 35.9% −2.1 pp (−3.1 to −1.1)
Fail 38.0% 35.2% −2.8 pp (−3.8 to −1.8)
Unclear, small sample 38.0% 37.8% −0.2 pp (−2.3 to +1.9)

Note: 17,000 shoppers per arm, except 4,000 per arm in the last row. Percentages and percentage points (pp) are rounded to one decimal place. Intervals use the Newcombe hybrid score method.

The first row passes, so B can ship if average order value also wins. In the second row B is well below A, yet its interval still reaches past the limit, so B doesn’t ship. The rule makes that call, not the team’s mood on the day.

Interval chart: four outcomes for checkout completion, B minus A, against a limit of minus 1.5 points. Pass, unclear, fail, and unclear with a small sample.
Pass, fail or unclear depends on where the whole interval falls, not on the point estimate.

The last row has the same point estimate as the first. With 4,000 shoppers per arm, the interval reaches −2.3 points, so the result is unclear rather than “no effect”. Only the sample size changed between those two rows, while the baseline and the limit stayed fixed.

Rare-event guardrails: report the counts

Some guardrails count events that hardly ever happen: refund requests, chargebacks, complaints and payment failures. A rate shown to two decimal places looks precise, yet it may stand for a handful of events. Report the count, the denominator and the rate together, for each arm.

The hypothetical example continues with the passing row. Variant A placed 6,460 orders and Variant B placed 6,426. Within 30 days of each order, these refund requests came in:

Arm Orders Refund requests Rate, exact 95% interval
Variant A 6,460 4 0.06% (0.02% to 0.16%)
Variant B 6,426 9 0.14% (0.06% to 0.27%)

B’s refund rate is 2.26 times A’s, which makes an alarming headline. An exact test on the 13 requests gives a two-sided p-value of 0.26.

The usual normal-approximation test for two proportions isn’t reliable at counts this low, which is why the exact test is used here. The honest report is “4 versus 9 refund requests, unclear”. It is neither “no effect” nor “B doubles refunds”.

A test sized for checkout completion can’t settle a change this small in a rare event. Say so on the test card, and set a count-based trigger in advance. One hypothetical trigger: pause and review if B reaches 10 refund requests and at least twice A’s count. It starts a review and doesn’t decide the test on its own.

Zero is a count too, and it doesn’t mean “never”. The rule of three applies when an event didn’t occur in n cases. The interval from 0 to 3/n is then a 95% confidence interval for its rate. In the same hypothetical example, zero chargebacks in Variant B’s 6,426 orders still leave room for a true rate up to about 0.047%.

Write what to watch into every A/B test

Before a test goes to whoever builds it, add one line under the primary metric. It names the guardrail, who is counted, the limit, the read date and the rare-event counts you’ll report.

For a first draft on a real page, Optimize Peak’s free first scan reads a screenshot. It returns up to four single-change tests, each with a primary metric and what to watch. It doesn’t see your traffic, so the limit and the read date are still yours to set.

More from the blog