# Traffic allocation

URL: https://docs.ablyft.com/guides/audiences-and-delivery/traffic-allocation/

> Decide how many visitors take part in an experiment and how they are split between the variations.



Traffic allocation has two levels:

1. **Overall traffic allocation:** how many of the eligible visitors take part in the experiment at all.
2. **Split per variation:** how the participating visitors are divided between your variations.

"Eligible" means visitors who passed the checks before: the [page](https://docs.ablyft.com/guides/audiences-and-delivery/pages/), the
[environment](https://docs.ablyft.com/guides/audiences-and-delivery/environments/), the [audiences](https://docs.ablyft.com/guides/audiences-and-delivery/audiences/)
and, if the experiment is part of one, the [exclusion group](https://docs.ablyft.com/guides/experiments/exclusion-groups/).

## Where to set it

1. Open the experiment.
2. Click the cog icon (**Edit settings**) at the top.
3. Go to the section **Traffic Split & Distribution** and change the values.
4. Save.

If the experiment is active, ABlyft publishes the change automatically.

## Overall traffic allocation

The slider **Overall traffic allocation (%)** answers "How much traffic should be allocated to this experiment?".

| Setting             | Meaning                                                                                                |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| **100 %** (default) | Every eligible visitor takes part.                                                                     |
| **50 %**            | About half of the eligible visitors take part. The others see your normal website and are not counted. |
| Allowed range       | 1 % to 100 %, in steps of 1 %.                                                                         |

Reduce the allocation if you want to limit the risk of a big change, or to keep part of your traffic free for other
tests. Keep in mind that fewer participants mean that you need more time for reliable results.

## Split per variation

Below the slider, the table lists every variation with its **Traffic** share.

* Each value is a whole number from 0 % to 100 %.
* The total of all variations must be **between 99 % and 100 %**. ABlyft shows an error if it is lower or higher.
* Variations with a higher share receive proportionally more of the participating visitors.

When you **add or delete a variation**, ABlyft automatically splits the traffic evenly again. If the split is not even
(for example 3 variations: 33 % each), the remainder goes to the **baseline** variation (the one marked as baseline in the
experiment settings, usually **Original**). Check the table after you changed the variations, especially if you had
set custom values before.

Example for 4 variations and 80 % overall allocation: of 1,000 eligible visitors, about 800 take part and about 200 each
see one of the four variations. About 200 visitors see your normal website.

> **Do not change the split while an experiment is running:** Visitors keep the variation they were assigned to, and visitors who were not included stay excluded. If you change the
> allocation of a running experiment, only visitors who have not yet been assigned are affected. The groups then have
> different sizes and different exposure time, which makes results hard to interpret. Decide on the split before you
> start. If you must change it, consider starting a new experiment.

## How the decision is made

The decision is made once per visitor, when they first qualify for the experiment:

1. ABlyft draws a random number to find out whether the visitor takes part (overall allocation).
2. If yes, ABlyft draws a variation, weighted by the shares in the table.
3. The result is stored in the visitor's browser. The visitor sees the same variation on every following visit.

Because the draw is random, the real split in your results can differ slightly from the set values, especially with few
visitors. ABlyft can warn you in the results if the split differs too much from the plan (sample ratio mismatch); this is
the project setting **SRM check**.

## Traffic allocation and exclusion groups

[Exclusion groups](https://docs.ablyft.com/guides/experiments/exclusion-groups/) have their own **Traffic** share per experiment. It is a
weight that decides which experiment of the group a visitor is assigned to. The order is:

1. The exclusion group decides which experiment the visitor can take part in.
2. The overall traffic allocation of that experiment decides whether the visitor takes part.
3. The variation split decides which variation the visitor sees.

So an experiment with a 50 % share in an exclusion group **and** an overall allocation of 50 % reaches roughly 25 % of
the visitors who qualify for the group.

## Next steps

- [Pre-test calculator](https://docs.ablyft.com/guides/results/pre-test-calculator/): Estimate how much traffic and time you need.
- [Exclusion groups](https://docs.ablyft.com/guides/experiments/exclusion-groups/): Keep experiments mutually exclusive.
- [Interpret results](https://docs.ablyft.com/guides/results/interpret-results/): Read the results correctly.

