Exposure in A/B testing: definition, formula and examples

An exposure is the moment a visitor actually sees a test variant. Why price tests count only exposed visitors, how to count them and the mistakes to avoid.

Definition

An exposure is the moment a visitor actually sees a test variant, such as a tested price on your pricing page. A test should count exposed visitors only, once each, in its denominators. Counting people who were assigned a price but never saw it, or bots that fetched the page, distorts revenue per visitor and conversion rate.

  • Count unique exposed visitors per variant, not page views.
  • Bots, link previews and prefetch requests should never count as exposures.

Exposure separates "was put in the test" from "saw the test". If your site gets 20,000 visitors a month and 6,000 of them open the pricing page, only those 6,000 were exposed to the price you're testing. The other 14,000 never saw it and couldn't react to it, so they don't belong in the comparison.

How to calculate it

Text
exposures                = unique visitors who saw the variant at least once
RPV per exposed visitor  = revenue ÷ exposures

Example: all 20,000 visitors are assigned a price when they land on the site, but only 6,000 reach the pricing page. If $39 earns $0.10 more than $29 per exposed visitor, the same gap measured over every assigned visitor shows up as $0.10 × 6,000 ÷ 20,000 = $0.03. The price did the same thing in both cases; only the denominator changed. Mixing the two denominators between reports, or between tests, makes the same result look more than three times smaller.

Why it matters for pricing

A price test is only as good as its denominators. Revenue per visitor divides by visitors, so every visitor who never saw the price, and every bot counted as a visitor, pulls the number toward zero. If junk traffic lands unevenly between prices, which is likely in small samples, it can tilt the comparison.

Leverprice logs an exposure the first time a visitor gets a price from an experiment, once per visitor and experiment, and offers a manual mode (logExposure(quote)) for pages where the price appears later, such as in a modal. Prefetch and prerender requests get a price but are not counted, and crawlers, link previews and uptime monitors are never enrolled. The docs show both modes.

Common mistakes

  • Logging the exposure when the price is assigned instead of when it is shown, for example on page load when the price sits in a modal the visitor never opens.
  • Counting page views. A visitor who opens the pricing page four times is one exposure.
  • Letting bots, uptime monitors and link previews in. When someone pastes your link into Slack or WhatsApp, the app fetches the page to build a preview, and that fetch looks like a visit.
  • Counting browser prefetches. A page loaded in the background because the visitor hovered over a link was never seen.

Exposure comes after sticky assignment and sets the denominator of revenue per visitor and conversion rate. Getting it right also decides how many visitors count toward your sample size.

Frequently asked questions

What is the difference between assignment and exposure?

Assignment decides which price a visitor would see; exposure records that they actually saw it. A visitor can be assigned on the homepage and exposed only when they reach the pricing page, or never.

Should a visitor who sees the price twice count twice?

No. Count each visitor once per experiment, at their first exposure, and attribute all their later purchases to the variant they were shown.