Open source, MIT licensed

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.

Read the docs
Hero headline · 4 versions
A“Ship faster with Acme”B“Cut your deploy time in half”C“Start free. No card needed.”D“Trusted by 4,000 teams”VisitorsSign-up
Version A
25%
—
Version B
25%
—
Version C
25%
—
Version D
25%
—
Day 1 of 30
learning…vs original

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.

4.9 KB
gzip, with 7 analytics adapters
No flicker
variant chosen before paint
10%
always-on control group
MIT
self-host on Node or Workers

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.

acme.dev
Google Ads
HeadlineABCDButtonABC
Headline→C
Start free. No card needed.
Your first project is live in five minutes.
Button→BStart free trial
Recent visitors
  • #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.

index.html
<!-- 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.

Classic A/B tool
Switchman
Traffic split
Fixed 50/50 until the test ends
Moves toward whatever converts, every hour
Who gets the winner
Everyone gets the same one
Separate winners by device, traffic source or country, once there's enough data
Measuring the gain
Variants compared with each other
Compared with a 10% control group that always sees the default
Flicker
Page hidden until the script loads
Version chosen before the page renders
Script size
30–100 KB
4.9 KB gzip
Where data lives
The vendor's servers
Your own server, or your PostHog project

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.

Make free-trial the default on home/hero, test speed next #128
switchman-autopilot opened this on Monday · 1 file changed
free-trial beat the default by +41% over 1,204 conversions (p 0.98). Promoting it to the default and adding speed as the next version to test.
<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

Self-hosted
$0forever

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
HostedComing soon
$29per month

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.