Skip to main content

Experiments

An experiment, or test, shows different versions of a page to different visitors and measures which does better. Build one in a single call or in parts, then start it.

📄️Create an experiment

Creates a draft. Only `name`, `type` and `page_url` are required, and the draft opens the way the dashboard opens one: an Original, one placeholder variation and targeting for the page. Anything else may be sent in the same call, under the same names the update calls use: `variations`, `allocation` and `split` (as in Replace variations), `primary` and `secondary` (as in Replace goals), `audience` or `conditions` (as in Replace targeting). All or nothing: a refusal in any part creates nothing. Needs an `editor` or `publisher` key.

📄️Replace variations

Replaces the whole list of variations. Send only what you are testing: the Original is added in front for you. A variation sent with its `id` keeps the visitors already assigned to it; one sent without an `id` is new, and one left out is removed. On an A/B test each variation carries its page `changes`; on a split URL test, its `url`; an A/A check takes only `allocation`. On a running or paused test, send every variation with its `id`, in the same order, with the same `split`: you can still rename them, move the baseline and change `allocation`, but adding, removing or reordering a variation, or changing the split, is refused with a 422, because it would move visitors already in the test. Needs an `editor` or `publisher` key.