Add hero CTA A/B test (hero_cta: control vs free_emphasis)

Sticky 50/50 variant assignment via gw_ab_hero cookie, server-rendered
so no flicker. Tracks exposures, CTA clicks, and booking conversions
to ab_events (table self-creates on first POST). Bot UAs are dropped;
exposures/clicks dedupe per session.

- ?ab=control / ?ab=free_emphasis forces and persists a variant
- /owner/experiments shows per-variant CVR and relative lift
- AB only runs on the marketing surface

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 08:14:18 +12:00
co-authored by Claude Opus 4.7
parent a7f8a619b1
commit 171b193498
14 changed files with 534 additions and 8 deletions
+6 -1
View File
@@ -14,7 +14,12 @@ export function createHomepageRouteData() {
return {
siteVariant: 'marketing',
content: homepageContent,
howItWorksEnabled: false
howItWorksEnabled: false,
ab: {
experiment: 'hero_cta',
variant: 'control' as const,
anonId: 'test-anon'
}
};
}