Sub topic 14
Testing and Iterating Onboarding Changes
Assume you understand product analytics events, funnels, and basic UI experimentation. This chapter focuses on how to test changes to an onboarding flow without confusing random variation with improvement.
Start with a specific hypothesis
An experiment is a controlled comparison between two or more versions of a product experience. The original version is the control. A changed version is the variant.
Write the hypothesis before changing the interface:
> If we replace the five-field profile form with one optional question, more new users will reach their first project without reducing project quality.
A useful hypothesis names:
- The change you will make.
- The user behavior you expect to change.
- The primary metric that will show success.
- Any negative result you must prevent.
Avoid testing several unrelated changes together. If you change the form, welcome message, and permission timing at once, you may see a different result but not know which change caused it.
Choose primary and guardrail metrics
The primary metric is the main outcome used to judge the experiment. For onboarding, it might be the percentage of new users who reach an activation event within seven days.
Guardrail metrics are checks that prevent a local improvement from causing a larger problem. For example, a shorter onboarding flow might increase activation but also increase support requests or low-quality accounts.
| Metric type | Example | Purpose |
|---|---|---|
| Primary | Users who create a first project | Judge the main hypothesis |
| Funnel step | Users who complete the setup form | Find where behavior changed |
| Guardrail | Seven-day retention | Detect harmful short-term gains |
| Quality | Projects containing required data | Check that activation is meaningful |
Define the event names and time window before the test starts. Also decide which users belong in the analysis. A returning user should not enter a first-run experiment as if they were new.
Run a fair comparison
Assign eligible users to the control or variant randomly. Keep each user's assignment stable so the same person does not see different versions during the test.
type Group = "control" | "variant";
function assignGroup(userId: string): Group {
let hash = 0;
for (const character of userId) {
hash = (hash * 31 + character.charCodeAt(0)) >>> 0;
}
return hash % 2 === 0 ? "control" : "variant";
}
console.log(assignGroup("user-42")); // Always returns the same groupTrack exposure as well as outcomes. An experiment_viewed event tells you that a user actually saw the assigned experience. Do not count users who were assigned to a variant but never loaded the relevant screen.
Interpret results carefully
Do not stop a test because one day looks promising. Wait until the planned sample size or test duration is reached. Small samples can produce large percentage swings.
Inspect the full funnel, not only the final activation rate. If the variant improves completion of step two but loses users at step three, the overall result may be unchanged. Segment results by relevant factors such as device type, locale, or user intent only when those segments were planned or have enough data. Otherwise, random noise can look like a discovery.
Combine quantitative results with qualitative evidence. Session replays, usability tests, and support messages can explain why users abandoned a step. They do not replace the experiment, but they help you choose the next change.
Iterate without losing the baseline
Record the decision, evidence, and follow-up action. If the variant wins, release it gradually and keep monitoring the guardrails. If it loses, preserve the control and revise one part of the hypothesis.
Exercise
A variant raises setup completion from 60% to 75%, but seven-day retention falls from 30% to 22%. Should you ship it immediately?
Show answer
No. Retention is a guardrail that worsened. Investigate whether the faster setup attracts users who are not prepared to succeed, then test a revised flow.