Skip to main content

Documentation Index

Fetch the complete documentation index at: https://auth0-feat-experiment-center.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Create an A/B test to determine if a friendlier signup headline leads to more users completing registration. Your current headline is “Create your account.” You want to test “Join in seconds” against it, measure which produces more successful signups, and promote the winner.

Prerequisites

To get started with the Experiment Center A/B test, you need:

Step 1: Create the feature flag

curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/feature-flags" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "signup-copy-test",
    "description": "A/B test for signup page headline copy",
    "parameters": {
      "signup_headline": {
        "type": "string",
        "value": "Create your account",
        "description": "Headline displayed on the signup screen"
      }
    }
  }'
Note the feature_flag_id in the response (e.g., flg_8Wm5kN3pXjVr6qBsGt1nCf).

Step 2: Create two variations

Control variation

The control variation has empty overrides. Users assigned here see “Create your account.”
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/feature-flags/flg_8Wm5kN3pXjVr6qBsGt1nCf/variations" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "control",
    "description": "Standard headline: Create your account",
    "overrides": {}
  }'
Note the variation_id (e.g., var_6Pr3nK9mDmTy8vWjNq2hFo).

Treatment variation

The treatment variation overrides the headline.
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/feature-flags/flg_8Wm5kN3pXjVr6qBsGt1nCf/variations" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "treatment-friendly-copy",
    "description": "Alternative headline: Join in seconds",
    "overrides": {
      "signup_headline": { "value": "Join in seconds" }
    }
  }'
Note the variation_id (e.g., var_3Kc1wR7nBmYz4uPdHv5gAt).

Step 3: Activate the feature flag

curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/feature-flags/flg_8Wm5kN3pXjVr6qBsGt1nCf/status" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "status": "active" }'

Step 4: Create the experiment

A 50/50 split is the standard choice for a clean A/B test where you want equal traffic on both sides.
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/experiments" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "signup-headline-ab-test",
    "description": "50/50 A/B test: standard headline vs friendly headline",
    "feature_flag_id": "flg_8Wm5kN3pXjVr6qBsGt1nCf",
    "allocation_strategy": "percentage",
    "assignment_config": { "subject": "device" },
    "allocations": [
      {
        "variation_id": "var_6Pr3nK9mDmTy8vWjNq2hFo",
        "weight": 50,
        "is_control": true
      },
      {
        "variation_id": "var_3Kc1wR7nBmYz4uPdHv5gAt",
        "weight": 50,
        "is_control": false
      }
    ]
  }'
Note the experiment_id (e.g., exp_1Vb7xQ4rNmWp9kDsZu3hJg).

Step 5: Validate and activate

# Validate
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/experiments/exp_1Vb7xQ4rNmWp9kDsZu3hJg/validate" \
  -H "Authorization: Bearer YOUR_TOKEN"

# Activate when valid
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/experiments/exp_1Vb7xQ4rNmWp9kDsZu3hJg/status" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "status": "active" }'

Step 6: Update your Universal Login page template

Update your signup page template to read the signup_headline parameter from experiment context. The exact syntax depends on your template engine and the variable name injected by the Experiment Center. Example with EJS templating:
<!-- signup.ejs -->
<div class="login-box signup-box">
  <h1>
    <% if (experiment && experiment.config.signup_headline) { %>
      <%= experiment.config.signup_headline.value %>
    <% } else { %>
      Create your account
    <% } %>
  </h1>

  <form action="/usernamepassword/signup" method="POST">
    <div class="field">
      <label for="email">Email</label>
      <input type="email" name="email" id="email" required />
    </div>
    <div class="field">
      <label for="password">Password</label>
      <input type="password" name="password" id="password" required />
    </div>
    <button type="submit">Sign up</button>
  </form>
</div>
What this renders:
  • Control users: “Create your account”
  • Treatment users: “Join in seconds”
  • Users when no experiment is active: “Create your account” (the else branch matches the baseline)
Deploy the updated template to your test tenant.

Step 7: Trigger test signups and observe

Run test signups through your test tenant. Open tenant logs and find successful signup events (type: "ss"). Confirm the experiment field is present: Control user signup event:
{
  "type": "ss",
  "date": "2026-06-01T16:00:00.000Z",
  "user_id": "auth0|new_user_abc",
  "experiment": {
    "experiment_id": "exp_1Vb7xQ4rNmWp9kDsZu3hJg",
    "variation_id": "var_6Pr3nK9mDmTy8vWjNq2hFo",
    "is_control": true,
    "segment_id": null,
    "config": {
      "signup_headline": { "value": "Create your account" }
    }
  }
}
Treatment user signup event:
{
  "type": "ss",
  "date": "2026-06-01T16:01:00.000Z",
  "user_id": "auth0|new_user_def",
  "experiment": {
    "experiment_id": "exp_1Vb7xQ4rNmWp9kDsZu3hJg",
    "variation_id": "var_3Kc1wR7nBmYz4uPdHv5gAt",
    "is_control": false,
    "segment_id": null,
    "config": {
      "signup_headline": { "value": "Join in seconds" }
    }
  }
}

Confirm results

Run enough test signups to verify both variations work:
  1. Approximately 50% of signup events show each variation
  2. The same test device consistently receives the same variation across multiple visits (deterministic assignment)
  3. Both headline versions render correctly in the page template

Analyze results

Pull enriched signup events from your analytics tool and compare completion rates across variation groups. A typical analysis: Step 1: Count signup attempts per variation Identify /authorize requests that reached the signup screen. At Beta, you track these via failed signup attempts (type: "fs") and successful signups (type: "ss") grouped by experiment.variation_id. Step 2: Count completions per variation Count type: "ss" (successful signup) events grouped by experiment.variation_id. Step 3: Compute completion rates
completion_rate = successful_signups / total_signup_attempts * 100
Compare completion_rate across the two variations. A higher completion rate for the treatment indicates the headline change had a positive effect. Example Snowflake query (sketch):
SELECT
  experiment_value:variation_id::string AS variation_id,
  COUNT(*) AS total_attempts,
  COUNT_IF(type = 'ss') AS successful_signups,
  successful_signups / total_attempts * 100 AS completion_rate_pct
FROM auth_events
WHERE experiment_value:experiment_id::string = 'exp_1Vb7xQ4rNmWp9kDsZu3hJg'
  AND type IN ('ss', 'fs')
  AND date >= '2026-06-01'
GROUP BY variation_id;
The exact JSON path for the experiment field in Snowflake depends on how your warehouse processes tenant log events. Replace experiment_value with the actual JSON column name in your warehouse, and check with your data engineer if you are unsure.

Promote the winner

When you are ready to promote the winning variation:
  1. Note the winning variation’s parameter values (signup_headline: "Join in seconds")
  2. Update your page template to use the winning copy as the static default (remove the experiment branch)
  3. Complete the experiment:
curl -X POST \
  "https://YOUR_TENANT.us.auth0.com/api/v2/experimentation/experiments/exp_1Vb7xQ4rNmWp9kDsZu3hJg/status" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "status": "completed" }'
Promotion is manual at Beta. Automated promotion (the system directly applying the winning variation to your tenant configuration) is a post-GA feature.
Only one experiment can be active per tenant at a time. Complete this experiment before starting a new one on a different feature.