Send every visitor down the track that converts.
Switchman is open-source conversion optimisation. Write a few versions of a headline, an offer or a page, and it sends each visitor to the one most likely to convert for them. A control group measures the gain.
A simulation with made-up numbers. Each lane is one version of a page's headline, each dot is a visitor, and a green ring is a sign-up. Over time more visitors go to the version that signs up the most people. Switch to By device and desktop and mobile each find their own winner.
What visitors see
The same idea from the visitor's side: a made-up landing page testing versions of its headline and its button. Each visitor gets the versions Switchman picked for them, before the page renders.
- #1,284Google Ads→headline C, button B—
How it works
Wrap the part of the page you want to test, like a headline, in a slot, and put each version inside it. The first version is the default and the rest stay hidden until Switchman shows them. If the script doesn't load, visitors see the default.
<!-- first in <head> --> <script src="https://switch.example.com/v1/s/acme.js"></script> <section data-sm-slot="hero"> <div data-sm-variant="default"> <h1>Ship faster</h1> </div> <div data-sm-variant="free-trial" hidden> <h1>Start free. No card.</h1> </div> </section>
Works with your stack
- Sites
- Next.jsCloudflare WorkersAstroHugoEleventyWordPressAny HTML page
- Analytics
- GA4PostHogSegmentAmplitudeMixpanelPlausibleUmami
- Payments
- Stripe
- Ad traffic
- Google AdsMetaTikTokMicrosoft AdsLinkedIn
- Agents
- Claude CodeCodexCursorany MCP client
Compared with A/B testing
An A/B test holds a fixed split until someone calls it, so half your visitors see the weaker version for the whole test. Switchman shifts traffic as results come in and keeps running after.
Built for coding agents
An agent writes the variants and opens a pull request, and you review it. The config lives in your repo and everything else is a CLI command.
<section data-sm-slot="hero">- <div data-sm-variant="default"><h1>Ship faster</h1></div>- <div data-sm-variant="free-trial" hidden>+ <div data-sm-variant="default"><h1>Start free. No card.</h1></div>+ <div data-sm-variant="speed" hidden>+ <h1>Live in five minutes.</h1>+ </div></section>
- SKILL.md
- Instructions that teach Claude Code, Codex or Cursor how to run Switchman.
- switchman brief
- Results so far, past tests and the live markup, as context for writing the next variant.
- switchman plan
- What to do next, ranked: promote, retire, add a variant, split by segment, or update the markup.
- switchman mcp
- An MCP server so agents can read status, results and history. Making changes needs --allow-act.
- autopilot.yml
- A weekly GitHub Action that runs the plan and opens a pull request.
Pricing
Everything, MIT licensed. Run the server on Node and SQLite, or on Cloudflare Workers and D1.
- The server that stores results, plus a dashboard
- CLI, MCP server and agent skill
- Next.js and Cloudflare integrations
- PostHog and Stripe integrations
We host the server for you. Your config stays in your repo.
- Hosted server with backups
- The same open-source runtime
- Unlimited tests and variants
- Move to self-hosted at any time
FAQ
Get started
This writes switchman.config.json and prints the snippet to paste into your page.