Traffic Allocation

How to split traffic effectively for A/B tests

Last updated: 2025-01-16

Traffic allocation determines how visitors are distributed between your experiment variants. The right allocation strategy balances statistical power with business risk.

Allocation Basics

When a visitor enters your checkout, CheckoutOS randomly assigns them to a variant based on your traffic allocation settings. Once assigned, visitors stay in that variant for their entire session and future visits.

Traffic Allocation Example
{
  "traffic_allocation": {
    "method": "random",
    "variants": [
      { "name": "Control", "weight": 50 },
      { "name": "Variant A", "weight": 50 }
    ],
    "sticky_assignment": true,
    "assignment_key": "visitor_id"
  }
}

Allocation Strategies

Equal Split (50/50)

The standard approach for most experiments:

  • Fastest to significance — Equal sample sizes optimize power
  • Simple to analyze — No weighting needed in calculations
  • Best for — Most standard A/B tests

Conservative Split (90/10)

Minimize risk when testing potentially disruptive changes:

  • Lower risk — Only 10% see the new experience
  • Slower results — Takes longer to reach significance
  • Best for — Major changes, new features, risky experiments
Conservative Allocation
{
  "traffic_allocation": {
    "variants": [
      { "name": "Control", "weight": 90 },
      { "name": "New Checkout Flow", "weight": 10 }
    ]
  }
}

Ramped Rollout

Gradually increase exposure to the variant:

Ramped Allocation
{
  "traffic_allocation": {
    "method": "ramped",
    "stages": [
      { "day": 1, "control": 95, "variant": 5 },
      { "day": 3, "control": 80, "variant": 20 },
      { "day": 7, "control": 50, "variant": 50 }
    ],
    "auto_progress": true,
    "hold_on_degradation": true
  }
}
When to Use Ramped

Use ramped rollouts when you want the benefits of testing but need to minimize risk. If the variant performs poorly, the impact is limited to a small percentage.

Multi-Armed Bandit

Automatically shift traffic toward better-performing variants:

Bandit Allocation
{
  "traffic_allocation": {
    "method": "bandit",
    "algorithm": "thompson_sampling",
    "exploration_rate": 0.1,
    "optimize_for": "revenue_per_visitor",
    "minimum_traffic_per_variant": 0.05
  }
}

Bandit Pros & Cons

  • Pro: Maximizes revenue during test
  • Pro: Adapts automatically to performance
  • Con: Harder to calculate significance
  • Con: May converge prematurely

Audience Targeting

Run experiments on specific customer segments:

Targeted Experiment
{
  "audience": {
    "include": [
      { "type": "customer_tag", "value": "vip" },
      { "type": "order_count", "operator": "gte", "value": 2 }
    ],
    "exclude": [
      { "type": "customer_tag", "value": "wholesale" }
    ],
    "percentage_of_audience": 100
  }
}

Targeting Options

  • Customer tags and segments
  • New vs returning visitors
  • Order history (first-time, repeat)
  • Cart value thresholds
  • Geographic location
  • Device type (mobile, desktop)
  • Traffic source (organic, paid, referral)

Exclusion Rules

Prevent certain visitors from entering experiments:

Exclusion Configuration
{
  "exclusions": {
    "other_experiments": ["experiment-123", "experiment-456"],
    "customer_segments": ["employees", "testers"],
    "conditions": [
      { "type": "cart_value", "operator": "lt", "value": 20 }
    ]
  }
}
Mutual Exclusion

When running multiple experiments, ensure they don't conflict. A customer in an upsell pricing test shouldn't also be in an upsell placement test — the results would be confounded.

Sample Size Calculator

CheckoutOS includes a built-in sample size calculator. Input your:

  • Baseline conversion rate — Your current performance
  • Minimum detectable effect — Smallest improvement worth detecting
  • Statistical significance — Usually 95%
  • Statistical power — Usually 80%

The calculator tells you how many visitors you need and approximately how long the test will take based on your traffic levels.

Best Practices

Traffic Allocation Tips
  • Start with 50/50 — Unless you have a reason not to
  • Use sticky assignment — Visitors should see consistent experience
  • Don't change allocation mid-test — This invalidates results
  • Exclude other experiments — Avoid interaction effects
  • Consider business cycles — Run tests for full weeks

Related Topics

Was this page helpful?

Need more help? Contact support