Lesson 7 of 9 · 26m
Experimentation Without Corrupting Product or Data
Integrate flags with assignment, exposure events, metrics, and experiment lifetimes while avoiding collisions, novelty effects, and self-deception.
Release flags and experiment flags often share machinery, but they answer different questions. A release flag asks can we expose this safely? An experiment asks does this variant cause a better outcome? Treating them as interchangeable gives you the worst of both: slow launches and meaningless metrics.
Assignment is not exposure
A user can be assigned to variant B and never see the feature. Exposure happens when the experience actually renders or affects behavior:
const variant = flags.variant("search.ranking-experiment", context);
if (variant === "semantic-v2") {
analytics.track("experiment_exposed", {
experiment: "search.ranking-experiment",
variant,
exposure_id: crypto.randomUUID(),
});
}Analyze exposed users with care, but do not confuse that with random assignment. If exposure depends on behavior — opening a page, using a feature, having a fast enough device — naive exposure analysis introduces selection bias. Many experiments need assignment-based intent-to-treat analysis first.
Keep assignment stable across surfaces
If web says A, mobile says B, and email assumes C, you are not running an experiment; you are manufacturing incoherent product behavior. Use the same subject key and bucketing logic across services, and version experiment configuration:
experiment: onboarding.checklist-v2
unit: tenant
allocation:
control: 50
checklist-v2: 50
start: 2026-11-15
end: 2026-12-13
metrics:
primary: activation_7d
guardrail: support_ticket_rateGuardrails are part of the experiment
A variant that improves conversion while doubling database cost or moderation burden may be a bad variant. Declare guardrails before looking at the primary metric: latency, errors, revenue integrity, abuse, accessibility complaints, operational load. Otherwise teams cherry-pick the dashboard after the fact.
Do not overlap conflicting experiments casually
Two tests can interact: one changes onboarding copy, another changes the onboarding checklist, and both claim credit for activation. Use mutual-exclusion layers or explicit interaction analysis when overlap is plausible:
layer onboarding only one onboarding experiment per tenant
layer checkout only one checkout experiment per user
layer infra performance tests, usually invisible to usersEnding is a product decision
Stop rules matter as much as start rules. End on time or sample size, not when the graph looks favorable. When a winner is selected, convert the experiment flag into a release/default decision and schedule removal. Losing variants should not linger as secret preferences for favorite customers.
Field notes
- Novelty effects are real. A spike in the first week is not proof of durable improvement.
- Do not peek at noisy dashboards and keep changing allocation mid-flight unless the design accounts for it.
- Experiments involving pricing, security, consent, or vulnerable populations need review beyond the growth team.
- Preserve the final assignment snapshot before cleanup; deleting the experiment configuration can make analysis impossible to audit.
Was this lesson helpful?