Appearance
ab-testing
FreshSource: 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)
| Method | Route | What |
|---|---|---|
| POST | /ab-testing/create | Create A/B test |
| GET | /ab-testing/:id | Test status with variants |
| POST | /ab-testing/:id/assign | Assign accounts to variants |
| GET | /ab-testing/:id/results | Per-variant results |
| GET | /ab-testing/:id/significance | z-test p-value |
| POST | /ab-testing/:id/declare-winner | Mark variant as winner |
| GET | /ab-testing/active | All 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.