Skip to content

Feat/vercel analytics split testing#220

Open
Olisachukwuma1 wants to merge 4 commits into
kellymusk:mainfrom
Olisachukwuma1:feat/vercel-analytics-split-testing
Open

Feat/vercel analytics split testing#220
Olisachukwuma1 wants to merge 4 commits into
kellymusk:mainfrom
Olisachukwuma1:feat/vercel-analytics-split-testing

Conversation

@Olisachukwuma1
Copy link
Copy Markdown
Contributor

Adds structured conversion tracking and split testing infrastructure to measure and improve funnel performance.

What's included:

Typed track() events for every step of the onramp, offramp, wallet connect, and bill payments funnels (start, progress, complete, abandon, fail)
useConversionTracking hook — typed wrappers so components never call track() with raw strings
A/B split testing via Edge Middleware cookie assignment — SSR-safe, no hydration mismatch, defaults to control on server
useExperiment hook — reads variant cookie, fires experiment_viewed once per page load
Two live experiments: onramp CTA copy and offramp CTA copy, injected via ctaLabel prop (decoupled from UI)
Dev-only useConversionMetrics hook — aggregates localStorage event counts, computes per-flow conversion rates
Acceptance: Conversion metrics visible in Vercel Analytics dashboard per flow.

closes #166

- lighthouserc.json: raise all thresholds to 0.9, add per-audit assertions (LCP <2.5s, TBT <300ms, CLS <0.1, FCP <1.8s)
- .github/workflows/ci.yml: add lighthouse job after build, fails CI if any score <90
- next.config.mjs: enable image optimization (avif/webp), add security headers (X-Frame-Options, CSP, Referrer-Policy)
- app/layout.tsx: enable font preloading for LCP, fix generator tag, add robots + OpenGraph metadata
- lighthouserc.json: remove startServerCommand (conflicts with workflow server start), fix assertion syntax (maxLength -> minScore for boolean audits)
- ci.yml: consolidate server start + lhci autorun into single step to avoid race conditions, capture PID for clean shutdown
- Requirements for typed conversion tracking across onramp, offramp, wallet connect, and bill payments flows
- A/B split testing infrastructure: Edge Middleware cookie assignment, SSR-safe useExperiment hook
- Two live experiments: onramp CTA copy and offramp CTA copy
- Dev-only useConversionMetrics hook with per-flow conversion rate computation
@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@PaveGroupeDev2 is attempting to deploy a commit to the kelly musk's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

47. A/B testing for onramp UX

2 participants