Guides

Variations

Controls, A/B/n tests (up to 50 variations on paid plans), weights, traffic allocation and split URL tests.

The control#

Every experiment has exactly one control: the version you have today. Lift and significance are always measured against it. On the new experiment form, choose Make control on any row to move it.

How many variations#

A URL split test has one control URL and one or more variation URLs. The free plan allows 1 variation (A/B only); paid plans allow up to 50. Weights must sum to 100 and default to equal shares.

More variations need more traffic

Each extra variation splits your visitors further, so every variation takes longer to reach a reliable sample. Two or three is usually right unless you have a lot of traffic.

Weights#

Weights decide how visitors who enter the experiment are split. They must add up to 100. Decimals are allowed. Common choices are 50/50, 34/33/33, or 90/10 when you want to limit exposure to a risky change.

Traffic allocation vs weights#

All visitorsTraffic allocationshare of visitorsControl (weight 50)Variant B (weight 50)Outside: default page, not countedinsideoutside
Two independent checks: one decides whether a visitor enters the experiment, the other picks the variation.

Traffic allocation (0 to 100%) decides whether a visitor enters the experiment at all. Weights then split the visitors who did enter. With 50% allocation and a 50/50 split, each variation gets about 25% of all visitors, and the other half see your default page without being counted.

How assignment works#

Assignment is deterministic. The visitor ID and experiment ID together always map to the same variation, in proportion to the weights. The result is stored, so later requests return the same variation even if the experiment changes. A second, separate hash decides traffic allocation, so changing allocation never reshuffles who gets which variation.

Naming variations#

Your code usually checks variation.variation_name, so pick short names you will not want to rename, such as "Control" and "Annual first". You can also add a description to remind your team what changed.

Split URL tests#

Give a variation a Redirect URL when the change is a whole page rather than an element. On the original page, ABTest.run (or runUrlTest) sends visitors in that variation to the URL. Leave the control's URL empty so control visitors stay where they are.

Original page
<script>
  ABTest.init({ apiUrl: 'https://YOUR-HOST', apiKey: 'cro_pk_prod_...' });
  ABTest.runUrlTest('exp_123');
</script>

The SDK skips the redirect when the visitor is already on the variation's URL path, so it is safe to load the same snippet on both pages.

Important

The redirect happens after the assign request returns, so visitors briefly see the original page. Load the snippet in the <head> to keep that short.