Janus Gate
How Janus Gate works
No statistics needed. Janus Gate tries different copy on your page, records what worked, and shows the stronger versions more often.
1 · The main idea
What counts as a success?
Every visitor sees one version of your title, CTA, and other marked copy. Janus Gate then asks: did this visit go well? That answer is a success, a soft success, or a failure.
Full success — conversion (click)
The visitor clicks your target button (trial, signup, buy…). That is the main win.
Soft success — engaged, no convert
No target click, but they scrolled about halfway (~50%) or stayed at least 15 seconds. Soft successes help when clicks are rare.
Scroll ≥ 50% means this visitor scrolled about halfway — not “50% of people scrolled”. Stay ≥ 15s means they were still on the page after 15 seconds from load. Either signal is enough (unless they already converted).
Failure — bounce
They leave quickly, barely scroll, and never click. That visit does not count as a win.
Over many visits, stronger versions rise on the monitor and get shown more often. Watch the colors and “% sure” — no formulas required.
2 · On each visit
What happens next
- A visitor opens your page.
- Janus Gate picks one variant per marked section.
- The same visitor keeps seeing the same choices (sticky session).
- Successes and failures are recorded for that visit.
- Over time, better variants turn green (“Winner” — usually around 90%+ sure with enough views) and get more traffic.
3 · Setup
Three steps — then watch the numbers
Tracking ID, script, markup, and Setup check live on each project's monitor — so every landing keeps its own ID.
- 1
Create a project
Add a landing in Projects to get a private tracking ID.
Open Projects - 2
Wire it on the monitor
Open that project → copy the script, mark title / CTA / body (optional baseline +
Go to your projectdata-mab-stylesfor CSS class tests), run Setup check. - 3
Start experiments
Flip Start experiments on the monitor to record visits. Your 14-day free trial starts here. Until then numbers stay at zero.
Open Projects
4 · Reading the monitor
Colors, baseline, and uplift
How to read the colors
- Green — Winner
- Yellow — leading
- Orange — still competing
- Red — behind
- Grey — too early to decide
Baseline vs winner
If you set data-mab-baseline, open the project monitor → What's winning?. Each section shows leader conversion % vs your control (uplift), and the control row is tagged Baseline in the list below.
5 · Multi-language pages
English, Spanish, Italian… one test, or one per language
Put the same script, with the same tracking ID, on every language version of your page. It does not matter how your site switches language: /es/, ?lang=es, es.yoursite.com or a language menu all work.
Janus Gate reads the language your page declares (<html lang="es">, which most sites already set) and by default keeps each language as a separate test: Spanish visitors never mix with English ones. You can use the same block names on every language, such as hero; in the monitor they appear as hero-es, hero-en.
One shared test, or one per language?
You choose in setup. With separate tests, each language finds its own winner, but splits your visits: two languages take about twice as long to give an answer. With one shared test, every visit counts towards the same result. We recommend sharing unless each language gets 10,000+ visits a week.
To share one test, add data-mab-lang="off" to the script tag on every language, and use the same block names, the same baseline and the same version ids everywhere: only the texts are translated. Each version must make the same promise in every language. The monitor still shows how many visitors acted in each language.
Switching language
- Monitor: click a language at the top. Every number, chart and block switches to it.
- Projects page: each project lists its languages with their visits; click one to open its results.
- Setup check: once a language page has had a visit, check it with one click, without changing the project URL.
If your page has no lang attribute
Add data-mab-lang="es" to the Janus Gate script tag on that page, or end the block names with the language yourself (hero-es). To keep all languages in one test, use data-mab-lang="off".
6 · React and Next.js
Use our React file
Your server always sends the page with today's text. The Janus Gate script then shows each visitor their version, before React starts, so nobody sees the text change. When React starts, it finds text that differs from what the server sent. Unless it is told this is on purpose, it treats it as an error and puts today's text back: the visitor is counted for one version while seeing another, and your results are wrong.
Our React file takes care of it. It works with Next.js (App Router and Pages Router) and with any React site rendered on the server.
1. Add the file to your project
Download janus-gate.tsx and save it unchanged, for example as components/janus-gate.tsx. It has no dependencies.
2. Add the script to your root layout
Put it first in <head>, with your project's tracking ID. Do not load it with next/script, async or defer: it must run before the page appears, or visitors see today's text change.
import { JanusGateScript, janusHtmlProps } from "@/components/janus-gate";
export default function RootLayout({ children }) {
return (
<html lang="en" {...janusHtmlProps}>
<head>
<JanusGateScript siteId="YOUR_TRACKING_ID" />
</head>
<body>{children}</body>
</html>
);
}3. Mark the blocks and the action
Use MabText for each block: it renders today's text and the attributes Janus Gate needs. On an element you render yourself, spread mabProps(…) instead. The action that counts only needs data-mab-convert="click".
import { MabText } from "@/components/janus-gate";
<MabText
as="h1"
section="headline"
baseline="current"
variants={{
current: "The headline your page has today",
new: "A headline with a very different promise",
}}
className="text-4xl font-semibold"
/>
<button type="submit" data-mab-convert="click">Send</button>Good to know
- A block holds plain text only. Put icons and other elements next to it, not inside: Janus Gate replaces the whole text.
- Pages reached with
<Link>work too: each visitor keeps the same versions on every page. - Writing the attributes by hand? Add
suppressHydrationWarningto every marked element and to<html>. - Languages: pass
languages="shared"toJanusGateScriptto share one test (see Multi-language). - Sites rendered only in the browser (such as a plain Vite app): paste the regular script in
index.htmlinstead of usingJanusGateScript.
7 · Prefer not to edit code?
We can set it up for you
Don't want to touch your landing page markup? Tell us what to test — we install the snippet, mark the variants, and check the monitor with you.
Prefer we do it for you?Try the demo at /example, then create a project in Projects — paste script, markup, and Start experiments live on that project's monitor.