> ## Documentation Index
> Fetch the complete documentation index at: https://docs.katla.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Banner experiments

> A/B test designs of your cookie banner with the Katla CLI.

A banner experiment tests up to three designs of your cookie banner against the banner you have
saved. Each visitor who has not answered yet sees one of them, and Katla compares how they answer:
under GDPR on the share who accept all (higher is better), under CCPA on the share who opt out
(lower is better).

> [!NOTE]
>
> Experiments are on the Pro plan and up. On other plans you can still list, read, stop and delete
> the ones you already have.

### List experiments

```bash theme={null}
katla experiments ls example.com
```

Shows each experiment's short ID, name, state (`draft`, `scheduled`, `running` or `ended`), dates,
and the variant you kept, if any. The short ID is enough to name an experiment in the other
commands: any unique start of the ID, 4 characters or more, works.

### Create an experiment

```bash theme={null}
katla experiments create example.com --name "Bar vs box" \
  --variant "Bottom bar:layout=banner,position=bottom-left"
```

The saved banner is always the control. Each `--variant` is a name, a colon, then the settings it
changes as `field=value` pairs separated by commas. Repeat `--variant` for up to 3 variants:

```bash theme={null}
katla experiments create example.com --name "Three designs" \
  --variant "Bottom bar:layout=banner,position=bottom-left" \
  --variant "Blocking modal:layout=modal,blocking=true" \
  --variant "Dark:theme=dark,radius=0"
```

| Field | Values |
| - | - |
| `layout` | `box`, `banner`, `modal` |
| `position` | `top-left`, `top-right`, `bottom-left`, `bottom-right`. With `layout=banner`, a `top-` position puts the banner at the top and a `bottom-` one at the bottom |
| `blocking` | `true`, `false` |
| `equalButtons` | `true`, `false` |
| `radius` | `0` to `10` |
| `theme` | `system`, `light`, `dark` |
| `showSettingsButton` | `true`, `false`. The floating cookie icon shown after a choice. With `false`, link to `katla.open()` elsewhere on the site so visitors can still change their mind |

Only presentation can change. Regulation, Consent Mode, DMA and policy links stay as the site has
them in every variant.

Visitors are split evenly unless you set `--weights`: whole percentages, the saved banner first,
adding up to 100.

```bash theme={null}
katla experiments create example.com --name "Careful test" \
  --variant "Bottom bar:layout=banner" --weights 80,20
```

The experiment is created as a draft. Nothing changes for visitors until you start it.

### Start an experiment

```bash theme={null}
katla experiments start example.com 3f2a9c1e
katla experiments start example.com 3f2a9c1e --start 2026-12-14 --days 21
```

Starts now, or when `--start` says, up to 90 days ahead: a date starts at midnight your local
time, or give an ISO date and time such as `2026-12-14T09:00+01:00`. It runs for `--days` days, 7 to 90, 14 by default,
then ends on its own and visitors go back to the saved banner. A site runs one experiment at a
time.

### Read the results

```bash theme={null}
katla experiments show example.com 3f2a9c1e
```

Shows the variants and, once it has started, the results for each regulation with visitors: how
many visitors each variant had, how many answered, the accept all and reject rates (or the opt-out
rate under CCPA), and each variant's difference from the saved banner in percentage points, with
the range the true difference most likely lies in.

The verdict says whether a variant did better, the saved banner did, or there is no clear
difference. While the experiment runs, it is where things stand so far. Until there are at least
100 visitors per variant and a full week of data, it says what it is still waiting for and roughly
how many more visitors each variant needs.

### Stop an experiment

```bash theme={null}
katla experiments stop example.com 3f2a9c1e
```

Ends a scheduled or running experiment now. Visitors see the saved banner again, and the results
stop changing.

### Keep a variant

```bash theme={null}
katla experiments apply example.com 3f2a9c1e b
```

Saves the variant's settings as the site's banner, ending the experiment first if it is still
scheduled or running. Variants are keyed `b`, `c` and `d` in the order you gave them, as `show`
lists them. Applying `control` keeps the saved banner as it is.

The command asks before it changes anything. Pass `--yes` to skip the question, for example in a
script.

### Delete an experiment

```bash theme={null}
katla experiments rm example.com 3f2a9c1e
```

Deletes a draft or an ended experiment, with its results. Stop a running one first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.