Site CRO Analytics — how this works
In the app: /sites/analytics
How it works
Read-only. A visit is split into a variant deterministically (assignSiteVariant() — the SAME lead always sees the SAME variant of a given site, so re-visits never pollute the test) and every view/CTA-click/form-submit/book-click is recorded as an Event (never with any PII in its payload — only siteId/slug/variant). This page tallies those events per (template, variant): visits = site_view count, conversions = the 3 conversion event types combined. A "Winner" only ever appears once a template's variants have each cleared a minimum sample size AND one leads outright (never a tie) — the exact pickWinner() algorithm CADENCE-04 already uses for sequence-step A/B tests, applied per template so a landing page's variant is never compared against a demo page's.
Data source
src/lib/sites/croAnalytics.ts (the pure stats/winner functions + the Prisma loader over Event rows).
Troubleshooting
No rows show up at all? No page has fired a site_view/conversion event yet — recordSiteEvent() has to actually be called from a live page render or action; it is not automatic. A template you expect to see a winner for shows none? Check each variant's visit count against the min-sample floor shown under its table, and confirm the two leading variants aren't exactly tied.
Who can see this: admin