Feature flag
A switch in your code, controlled from outside, that turns a feature on or off or serves a value to a chosen share of users.
A feature flag lets you ship code with a new feature turned off, then turn it on for some users without a new deploy. Flags can also serve values (text, numbers, settings) instead of on or off.
With a random split and a held-back group, a flag becomes an experiment: you can measure what the new value changes.
A headless store ships a new search ranking behind a flag, turns it on for 20% of visitors and compares orders with the rest.
Related terms
- Server-side testingRunning experiments in your own server or edge code rather than by changing the page in the visitor's browser.
- BucketingHow a testing tool assigns each visitor to a variant and keeps them there on later visits.
- Traffic allocationHow much of the eligible traffic enters a test, and how it is divided between the variants.