Skip to content

feat: A/B testing framework for campaign variants #624

@joelpeace48-cell

Description

@joelpeace48-cell

Background & current state

Operators can't experiment on campaign presentation/parameters; there's no A/B testing. Optimizing conversion at scale requires controlled experiments.

Goal

Add an A/B testing framework: sticky variant assignment, exposure logging, and a results readout with significance.

Technical design

  • Experiment definition (variants + traffic split). Sticky assignment per user (hash of user+experiment) so a user always sees the same variant; log exposures + outcomes (register/claim) to the indexer/analytics.
  • Results endpoint computing conversion per variant + a basic significance test.

Edge cases

  • Variant rebalancing mid-experiment → keep existing assignments sticky.
  • Multiple concurrent experiments → independent assignment.
  • Low sample → mark "not significant".
  • Server + client consistency of assignment.

Task breakdown

  • Experiment config + sticky assignment (server + client).
  • Exposure/outcome logging.
  • Results endpoint + significance.
  • Tests: assignment stability + stats.

Acceptance criteria

  • Users get a stable variant; results (conversion + significance) are measurable per variant.

Testing & verification

  • Assignment stability test; significance computation test.

Out of scope

  • Visual experiment builder.

Dependencies / related

  • Uses analytics (NEW-099/100); pairs with feature flags (NEW-102).

Difficulty: hard · Effort: M–L

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions