Namespaces & Holdouts
Why experiment overlap is dangerous
Section titled “Why experiment overlap is dangerous”When you run two experiments at the same time that affect the same page or user journey, users can end up assigned to both. This creates interaction effects — the result of experiment B is contaminated by experiment A’s treatment. Your data looks clean but the conclusions are wrong.
GrowthBook solves this with namespaces.
Namespaces
Section titled “Namespaces”A namespace is a shared bucketing pool. Every experiment assigned to a namespace carves out a non-overlapping slice of the 0–1 traffic range. A user who falls at position 0.42 in the namespace can only be in the experiment that owns that slice — never two at once.
Creating a namespace
Section titled “Creating a namespace”- In the GrowthBook sidebar, navigate to Settings → Namespaces.
- Click Add Namespace.
- Give it a meaningful name, e.g.
checkout-flow. - Click Save.
Assigning an experiment to a namespace
Section titled “Assigning an experiment to a namespace”- Open the experiment you want to assign.
- Click Edit on the experiment’s targeting section.
- Under Namespace, select your namespace from the dropdown.
- Set the Range — two sliders defining the start and end of the traffic slice this experiment owns (e.g., 0.00–0.50).
- Click Save.
Tip: Two experiments in the same namespace with non-overlapping ranges will never share a user. Experiments in different namespaces are independent bucketing pools and can overlap freely.
Holdout groups
Section titled “Holdout groups”A holdout is a segment of users deliberately excluded from all experiments in a namespace for a set period. When the holdout ends, you compare the holdout group’s metrics against the rest of the population to measure the cumulative long-term impact of all the experiments they missed.
Without a holdout, experiment results reflect short-term lift. With a holdout, you can answer: “Have all these features we shipped actually moved the needle over the last quarter?”
Creating a holdout experiment
Section titled “Creating a holdout experiment”GrowthBook models a holdout as a regular experiment where the control group receives no treatment and is excluded from all other experiments in the namespace.
- Navigate to Experiments → Add Experiment and choose Holdout.
- Assign it to your namespace and give it a wide range, e.g. 0.90–1.00 (the top 10% of traffic becomes the holdout).
- Set the duration (e.g., 90 days).
- Click Start Experiment.
Any experiment in the same namespace that does not overlap with 0.90–1.00 will never reach the holdout users.
// SDK-side: namespaces are transparent.
// You configure them in the GrowthBook UI;
// the SDK assignment hash already respects namespace ranges.
const gb = new GrowthBook({
apiHost: 'https://cdn.growthbook.io',
clientKey: 'sdk-YOUR_DEV_KEY',
attributes: { id: 'user-123' },
});
await gb.init({ timeout: 2000 });
// This assignment will NEVER conflict with another
// experiment in the same namespace that owns a
// non-overlapping range.
const result = gb.runInlineExperiment({
key: 'checkout-cta',
variations: [0, 1],
});
console.log('Variation:', result.value);