1. Experiments in Observe
An experiment assignment is a pair of an experiment key and a variant, for examplelogin-layout with variant-a. Observe creates the experiment and its variants automatically when the first journeys carrying them are processed. No setup is needed before you send data.
Experiments and tags both add context to journeys, but serve different purposes:
Experiments are stored separately from tags and do not count toward the tag limits.
2. Pass assignments from the browser
If the assignments are available in the browser, Autocapture can pick them up automatically, for example from the responses of your A/B testing tool. Corbado configures this together with the capture rules for your login, so your application does not need to change. Share which experiments you run and where your page receives their assignments. If Autocapture cannot read an assignment on its own, hand it over from your page in one of two ways. You can combine both.2.1 Assignments known at page load
Addexperiments to window.corbadoObserveConfig in an inline script before the Autocapture script tag:
2.2 Assignments decided later
CallsetExperiments() when your application knows the assignment, and again when it changes:
3. Pass assignments from your backend
If your backend assigns the variant, send it with backend enrichment. Addexperiments to a flow_enriched event and identify the browser session with sessionID, which your page reads with window.CorbadoObserve.getSessionId() and passes to your backend:
_ and - for experiment keys, with at most 128 characters. Variants are strings with at most 255 characters.
4. How journeys get their variant
Observe attributes each journey to the variant that is active while it runs:- Assignments stay active: once passed, an assignment applies to all following journeys of the session until you pass a new variant for the same experiment. Events without an assignment do not change it.
- Changes during a journey: if the variant changes while a journey runs, the latest variant within that journey applies. Each journey counts for exactly one variant per experiment.
- Nested journeys: a journey started inside another one, for example a sign-up inside a login, gets the same variant as the surrounding journey.
- Sessions and devices: assignments apply within one browser session. Journeys on other devices are not linked to them, so assign the variant per visitor and pass it on every device the visitor uses.
5. Set up and analyze an experiment
5.1 Check the incoming data
Open Experiments → Manage. Experiments and their variants appear here once the first journeys carrying them have been processed. Use Explore exposure to confirm that each variant receives traffic and that the split is roughly as planned.5.2 Create a run
A run is a named, time-boxed evaluation of one experiment. Select New run and fill in:
After you create a run, Observe reprocesses the selected flows. Depending on the amount of data, the comparison can take up to 60 minutes to become available.
5.3 Analyze the results
Open Experiments → Analysis and select the run. The analysis compares the journeys of each variant during the run’s window against the control:- Completion rate: how many journeys ended successfully
- Error rate: how many journeys ran into errors, and which errors differ between variants
- Completion time: how long successful journeys took
- Flow allocation: whether each variant received its planned share of journeys
6. Test your setup
- Pass an assignment from a test page that runs Autocapture with a test project.
- Complete a login with each variant.
- Open Experiments → Manage and check that the experiment and its variants appear.
- Use Explore exposure to check that your test logins are counted for the expected variants.
7. Next steps
- Continue with Tags to segment journeys by business context.
- Continue with Backend enrichment to send assignments and other facts from your backend.
- See Analytics for the other analysis views.