Skip to content

ab-testing

Fresh

Source: BIBLE.md (Phase 12 Phase 6, ab-testing 7 routes, z-test significance)

Tests different click patterns, dwell times, bounce rates, search refinements. Measures impact on rankings. Statistical significance tracking with z-test.

Test types

  • Dwell time: short vs medium vs long
  • Pre-click count: 0 vs 1 vs 2 non-target organic clicks
  • Internal click depth: 1 vs 2 vs 3 pages
  • Refinement search: yes vs no
  • Click pattern: top-result-then-target vs target-only

Routes (7)

MethodRouteWhat
POST/ab-testing/createCreate A/B test
GET/ab-testing/:idTest status with variants
POST/ab-testing/:id/assignAssign accounts to variants
GET/ab-testing/:id/resultsPer-variant results
GET/ab-testing/:id/significancez-test p-value
POST/ab-testing/:id/declare-winnerMark variant as winner
GET/ab-testing/activeAll running tests

Example: create test

bash
curl -X POST http://localhost:4700/ab-testing/create \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Dwell time impact on Dallas junk removal",
    "keyword": "junk removal dallas",
    "domain": "journeyjunkremoval.com",
    "variants": [
      { "name": "short", "config": { "dwellTime": "short" }},
      { "name": "medium", "config": { "dwellTime": "medium" }},
      { "name": "long", "config": { "dwellTime": "long" }}
    ],
    "metric": "rank-improvement",
    "minSampleSize": 30
  }'

Statistical significance

/ab-testing/:id/significance returns z-test p-value. Variants below p=0.05 are flagged as significant.