element
The default. Swaps text, HTML, or attributes on a CSS selector. The tracker applies it client-side before paint, so there is no flicker. Use it for headline, copy, and layout tests.
An experiment splits your visitors into variants, measures a goal, and reports which variant wins. Versuch keeps assignment deterministic and sticky so every surface (browser, server, dashboard) agrees on which variant a visitor sees.
element
The default. Swaps text, HTML, or attributes on a CSS selector. The tracker applies it client-side before paint, so there is no flicker. Use it for headline, copy, and layout tests.
cta
Overrides a button or link (an element override, or a hosted component Versuch renders for you). The default goal is cta_click. Use it for call-to-action wording, colour, and destination tests.
manual
Server- or code-controlled, with no auto-apply. You fetch the variant yourself and render it however you like. Use it for server-rendered pages, pricing logic, onboarding flows, or anything the tracker cannot reach into.
versuch.experiment(key) in the browser or POST /v1/experiments/:key/assign on the server.A visitor’s variant is a deterministic hash of their visitor id plus the experiment key. There is no server round-trip to decide it and nothing is stored per visitor: the same visitor id and key always hash to the same variant, so a returning visitor stays in the same bucket, and a browser call and a server call agree for the same unit.
Because assignment hashes on the variant keys and their order, keys are fixed after creation. Changing them would re-bucket everyone.
Two distinct events drive results:
element and cta this fires when the variant is applied to the page. For manual it fires on the first versuch.experiment(key) call or the first assign POST for that unit.versuch.track("goal") in the browser or a server-side track, tied to the variant the unit was assigned.Results compare conversions against exposures per variant, so a visitor only counts once they have actually been exposed.
The goal is the event name that counts as a conversion, for example signup or purchase. For cta experiments the default goal is cta_click. For manual experiments a goal is required at creation: it is the event name you will emit for conversions.
Every experiment is analysed by one of two engines, chosen at creation with statsEngine (default bayesian):
Pick one at creation; it decides how results are computed and presented.