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.

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

  1. A visitor opens your page.
  2. Janus Gate picks one variant per marked section.
  3. The same visitor keeps seeing the same choices (sticky session).
  4. Successes and failures are recorded for that visit.
  5. 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. 1

    Create a project

    Add a landing in Projects to get a private tracking ID.

    Open Projects
  2. 2

    Wire it on the monitor

    Open that project → copy the script, mark title / CTA / body (optional baseline + data-mab-styles for CSS class tests), run Setup check.

    Go to your project
  3. 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

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

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

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.