One call
orwel.experiment(key, variants) returns the variant for the current visitor. Declare variants three ways:
How it works
Sticky assignment
Sticky assignment
The variant is derived deterministically from the visitor id — the same visitor always sees the same variant, with no server round-trip.
Auto exposure
Auto exposure
The SDK fires
optimize_experiment_impression once, with the experiment key and variant.Auto-discovery
Auto-discovery
The experiment appears in the dashboard from those exposures — no pre-registration, exactly like the events catalog.
Analyzing
Pick any tracked event or conversion as the goal — at analysis time, not upfront. Orwel ties each exposed visitor to whether they hit the goal afterward, and shows conversion rate per variant plus the leading one.Recipes
Common experiments — copy, adapt the key, ship.Next steps
Conversions
Define the goals you measure experiments against.
SDK Reference
The full
experiment() signature and options.