Case study
myab
myab lets a website run A/B tests and feature flags from one small script. Visitors are split in the browser, results are kept as running totals, and the statistics stay valid however often you check them.

What it does
- Browser script held to a 3.75 KB (gzipped) budget on every build
- Sequential and Bayesian results, CUPED and multi-armed bandits
- Libraries for React, server-side JavaScript, Python, PHP, Go, Ruby, Swift and Android
Every library is tested against the same 13,120 cases, so a visitor gets the same variant and the same flag values whichever language decides it.
The statistics include a sample ratio mismatch check, which catches tests whose traffic split has gone wrong.
How it fits together
-
People
- Visitors' browsers running the SDK
- Teams using the dashboard
-
Edge
- CDN Worker serving the SDK and experiments
- Ingest Worker receiving results
-
Processing
- Cloudflare Queue
- API Worker (Hono)
-
Data
- D1 running totals
- R2 raw events
How it's built
- Results arrive as small beacons, go through a Cloudflare Queue, and are kept as running totals in D1, with raw events in R2.
- The API is a Hono app on Workers. The dashboard is a React app, and the website and documentation are built with Astro.
- One TypeScript monorepo (pnpm and Turborepo), with infrastructure in Terragrunt and deployments through GitHub Actions.
- Simulations check that the false-positive rate holds even when results are checked repeatedly.
Services involved
Articles about myab
-
A small A/B testing script that gives the same variant everywhere
How myab holds its browser SDK to a gzipped size budget on every build, and keeps variant assignment identical across its SDKs with shared test cases.
-
How HeySales counts visits from people who haven't accepted cookies
How the HeySales tracker counts visits with nothing stored on the device until a visitor agrees, recognises them for a day by hash, and flags bots.
Tell us what you're building.
Email us about your project: what it needs to do, who it's for and when you'd like it live.