Sub topic 12
Running experiments on the funnel
This chapter assumes you know the PLG funnel (signup, activation, conversion), have a defined activation event, and can read cohort percentages. You should also be comfortable with the idea of a conversion rate. Here you will learn how to plan, run, and read an experiment on one stage of that funnel.
Why experiment instead of just shipping changes
A funnel metric moves for many reasons. A new marketing campaign brings a different kind of visitor. A holiday week changes behavior. A bug fix lands the same day as your new onboarding checklist. If you ship a change and watch the number, you cannot tell which cause moved it.
An experiment fixes this by running two versions at the same time on comparable users. Users are assigned at random to a control (the current experience) or a variant (the changed experience). Because assignment is random, the two groups differ only by chance and by your change. A difference in outcomes beyond chance can then be credited to the change.
Anatomy of a funnel experiment
Every experiment needs the same parts written down before it starts.
| Part | What to write | Example |
|---|---|---|
| Hypothesis | A change, an expected effect, and the reason | Adding a sample report to the empty state will raise activation because users see the aha moment sooner |
| Unit | Who is randomized | New signups, one assignment per user |
| Primary metric | The one number that decides the result | 7-day activation rate |
| Guardrail metrics | Numbers that must not get worse | Activated-to-paid rate, support tickets per signup |
| Sample size | Users needed per group | Calculated before launch |
| Duration | How long it runs | At least two full weeks |
| Decision rule | What you will do for each outcome | Ship if activation rises and guardrails hold |
Writing the decision rule first matters. If you decide what counts as success after seeing the data, you will tend to find a story that fits.
Choose a primary metric close to the change
Pick the metric the change can plausibly move. An onboarding change should be judged on activation rate, not on revenue. Revenue is affected by too many other things, and paid conversions arrive weeks later, so the test would run too long.
There is a risk in the other direction. A metric very close to the change, such as "clicked the checklist", is easy to move and may not matter. Activation, as you defined it earlier, sits at a useful distance: it is near enough to move quickly and it predicts conversion.
Add a guardrail metric
A guardrail metric protects against winning on the primary metric while damaging something else. Suppose you make the activation event easier to trigger. Activation rate rises, but if activated users now convert to paid at a lower rate, you have inflated the metric without creating value.
The guardrail for an activation test is often the activated-to-paid rate, since it checks that the extra activations are real. The Python example from the funnel chapter shows how the stages multiply:
def conversion_rate(converted: int, started: int) -> float:
"""Share of started trials (or free accounts) that became paid."""
if started == 0:
return 0.0
return converted / started
cohort = {"signups": 2000, "activated": 640, "paid": 96}
activation_rate = conversion_rate(cohort["activated"], cohort["signups"])
activated_to_paid = conversion_rate(cohort["paid"], cohort["activated"])
overall = conversion_rate(cohort["paid"], cohort["signups"])
print(f"activation: {activation_rate:.1%}")
print(f"activated -> paid: {activated_to_paid:.1%}")
print(f"signup -> paid: {overall:.1%}")Overall conversion is activation times activated-to-paid. An experiment can raise the first factor while lowering the second, and the product of the two may not improve. Watching both catches this.
Measuring the primary metric
Compute the metric the same way for both groups, with the same time window per user. The SQL below calculates weekly activation by signup cohort. For an experiment you would add the assigned group to the grouping.
WITH signups AS (
SELECT user_id, created_at AS signup_at
FROM users
WHERE created_at >= DATE '2026-01-01'
),
activated AS (
SELECT s.user_id, MIN(e.occurred_at) AS activated_at
FROM signups s
JOIN events e ON e.user_id = s.user_id
WHERE e.event_name = 'report_shared'
AND e.occurred_at < s.signup_at + INTERVAL '7 days'
GROUP BY s.user_id
)
SELECT
date_trunc('week', s.signup_at) AS signup_week,
COUNT(*) AS signups,
COUNT(a.user_id) AS activated,
ROUND(100.0 * COUNT(a.user_id) / COUNT(*), 1) AS activation_pct
FROM signups s
LEFT JOIN activated a ON a.user_id = s.user_id
GROUP BY 1
ORDER BY 1;Notice the 7-day window is measured from each user's own signup time, not from the experiment's start date. A user who signed up on the last day of the test needs seven more days before you can judge them. This is why you must wait for the window to close on the last cohort before reading the result.
Sample size and duration
Small differences need many users to detect. Before launching, estimate how many users each group needs. The inputs are:
- The baseline rate of your primary metric (for example, 32% activation).
- The minimum detectable effect, the smallest lift worth acting on (for example, 3 percentage points).
- The significance level, commonly 5%.
- The power, commonly 80%, which is the chance of detecting a real effect of that size.
This function gives an approximate per-group sample size for comparing two proportions.
from math import ceil, sqrt
from statistics import NormalDist
def sample_size_per_group(
baseline: float,
lift: float,
alpha: float = 0.05,
power: float = 0.80,
) -> int:
"""Approximate users per group to detect an absolute lift in a rate."""
p1 = baseline
p2 = baseline + lift
z_alpha = NormalDist().inv_cdf(1 - alpha / 2)
z_beta = NormalDist().inv_cdf(power)
p_bar = (p1 + p2) / 2
numerator = (
z_alpha * sqrt(2 * p_bar * (1 - p_bar))
+ z_beta * sqrt(p1 * (1 - p1) + p2 * (1 - p2))
) ** 2
return ceil(numerator / (lift ** 2))
print(sample_size_per_group(0.32, 0.03))With a 32% baseline and a 3-point lift, this prints roughly 3,700 users per group. If you get 500 signups a week, split in two, you need about 15 weeks. That is too long, so you have three honest options: accept a larger minimum detectable effect, test a bigger change, or pick a metric earlier in the funnel.
Run for whole weeks
Even when you reach the sample size sooner, run the test for at least one full weekly cycle, and preferably two. Weekday and weekend signups often behave differently, and a test that covers only part of a week can be biased toward one type.
The experiment flow
The diagram shows the order of decisions from idea to result.
Common errors
Stopping when the result looks good
If you check the results daily and stop the first time the difference looks significant, you will often stop on noise. Early in a test the rates swing widely. Fix the sample size and duration in advance and read the result at the end.
Testing many things at once
If you change the headline, the checklist, and the email sequence in one variant, a win tells you the bundle worked but not which part. Bundles are fine when you only need to know whether to ship the whole thing. When you want to learn what works, change one thing per test.
Randomizing the wrong unit
Randomize by user, or by account if people in the same account interact. If two teammates in one account see different versions, the experience leaks between groups. In B2B products, account-level assignment is usually safer.
Ignoring segments that behave differently
An overall lift can hide a loss in one segment. A shorter onboarding may help individual users and hurt larger teams. Look at a few segments chosen in advance, such as plan size or acquisition channel, but treat a surprising result in one segment as a lead for a follow-up test, not a finding.
Judging by the wrong time horizon
A change to a trial length or a paywall can raise early conversion while pulling forward customers who would have paid later, or increase churn. Where the change touches pricing or limits, follow the cohort through at least the first renewal before calling it a win.
Interpreting results
When the test ends, report three things for each metric: the control value, the variant value, and the uncertainty around the difference, usually a confidence interval. A result of "+2.1 points, interval from -0.4 to +4.6" is inconclusive, not a small win. The honest outcomes are a clear win, a clear loss, or not enough evidence to tell.
An inconclusive result is still useful. It says the change does not move the metric by an amount larger than your minimum detectable effect, so you can stop investing in that idea.
Exercises
Exercise
Your free-to-activated test shows activation rising from 30% to 36%, but the activated-to-paid rate falls from 15% to 9%. Using the funnel arithmetic, does overall signup-to-paid conversion improve? Which metric acted as the guardrail?
Show answer
Control overall conversion is 0.30 × 0.15 = 4.5%. Variant is 0.36 × 0.09 = 3.24%. Overall conversion gets worse, so the variant should not ship as is. The activated-to-paid rate was the guardrail, and it caught that the extra activations were lower quality.
Exercise
A teammate checks the experiment dashboard every day and stops the test on day 6 because the p-value dipped below 0.05. The plan called for two weeks. What is the problem, and what should happen instead?
Show answer
Repeated checking and stopping at the first significant reading inflates the false-positive rate, because early results fluctuate. The team should keep the test running to the planned sample size and duration, then read the result once against the decision rule written in advance.