Log streaming: if you already stream tenant logs to an analytics tool (Datadog, Splunk, Segment, etc.), enriched experiment metadata flows through the same stream automatically
If you want to target specific traffic, create a segment. Skip this step if you want a simple percentage split across all traffic.This example creates a segment that matches mobile users in the United States:
Create an experiment that references your feature flag and defines how to split traffic.This example uses a 90/10 percentage split: 90% of users get the control, 10% get the treatment. This is a typical cautious rollout starting point.
Before activating, confirm the experiment is ready. The validate endpoint returns the same checks that run on activation.
curl -X POST \ "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/experiments/exp_9Km3nZ7vQwRx2yDjFs5gCp/validate" \ -H "Authorization: Bearer YOUR_TOKEN"
Sample response
{ "is_valid": true, "errors": []}
Response when not valid (200 OK, but with errors):
Sample response with errors
{ "is_valid": false, "errors": [ { "code": "feature_flag_not_active", "message": "Feature flag flg_72jbvv7LfRKYp59gtRLtkn is in draft status; must be active" } ]}
If is_valid is false, fix the listed errors before proceeding. Common blockers are covered in the troubleshooting guide.Once is_valid: true, you are ready to activate.
Before going live, test both variations using query parameter overrides. This lets you verify that your ACUL components, Actions, or page templates render correctly for each variation.Test the control variation:
The experiment is now live. started_at is set on first activation and does not change if you pause and reactivate.
One active experiment per tenant. If another experiment is already active, activation returns 400 experiment_active_limit_exceeded. Pause or complete the other experiment first.
Complete the login flow. The Experiment Center resolves the active experiment, assigns a variation using deterministic hashing, injects the experiment context, and enriches the resulting auth event.
Open your tenant logs (Auth0 Dashboard > Monitoring > Logs) and find the auth event for your test login. The event should include experiment metadata under an experiment field.
The experiment field appears on every auth event where an experiment was active during the transaction. The variation_id tells you which variation this user was assigned to.If you do not see the experiment field, check the troubleshooting guide.
You have successfully run your first experiment when:
Your auth events in tenant logs include the experiment field with experiment_id and variation_id
Both variations produce the correct behavior when tested with query parameter overrides
The same device or user consistently gets the same variation_id across multiple auth events (deterministic assignment)