Docs

Experiments

Documentation

Experiments

How SpryUI splits traffic so you can prove which version creates the best result.

Setup checklist

  1. Create experiment and add at least two variant messages.
  2. Set variant weights (relative allocation, not strict percentage caps).
  3. Optionally mark one variant as control for reporting clarity.
  4. Activate experiment status.
  5. Verify variant messages are themselves eligible (targeting/schedule/frequency).
Snippetjson
{
  "id": "expm_...",
  "name": "Homepage CTA Test",
  "variants": [
    { "id": "expv_a", "messageId": "mess_a", "label": "Control", "weight": 50, "isControl": true },
    { "id": "expv_b", "messageId": "mess_b", "label": "Variant B", "weight": 50, "isControl": false }
  ]
}

Assignment model

  • Assignment is deterministic hash-based per experimentId + userKey.
  • User key preference: explicit user id first, then session key fallback.
  • Same key stays on the same variant across refreshes.
  • Weights decide allocation bands within total weight.
  • If total weight is 0, SDK falls back to the first variant.

When splitting appears not to work

  • Experiment is inactive.
  • Only one variant exists or total weight is invalid.
  • Variant message is filtered out before assignment (not eligible).
  • Message still appears in rotation because it is not in the active experiment.
  • Existing arbitration rules suppress one variant after assignment (for example modal or rail conflicts).

Control group meaning

Control is a reporting label only. Traffic share is still determined by variant weights.