Skip to content

Experiments ​

An experiment assigns a subject to a variant, deterministically, from configuration the SDK has already fetched — so variant() is a local lookup, not a network call, and it is safe on a hot path. The first read of an experiment emits an $exposure event; subsequent reads of the same experiment in the same session do not, so exposure counts stay honest.

There are no standalone feature flags. An experiment is the only construct. Every SDK page says this in its own words; it is a deliberate product decision, not a gap waiting to be filled.

Who the subject is depends on where you are. In a browser or a mobile app the subject is the client: one user, one stored identity, no argument needed. On a server there is no ambient subject — you pass the identity in, on every call. Getting this wrong on a server is the single most common experiments bug, and it fails quietly by bucketing everyone the same way.

When the config fetch fails, variant() returns your fallback and no $exposure fires. An experiment that always returns the fallback is almost always the config fetch, not the bucketing.

Per-SDK reference ​

Each page's §10 covers variant(), every reason it falls back, exactly when $exposure does and does not fire, every targeting operator, and traffic allocation.

React uses the browser client directly; see Browser §10.

Tangent — product analytics.