close this to read article
Specifying the traffic percentage for a test allows you to control the number of visitors to be included in the test. This feature helps you to run a test initially on a small number of visitors.
For example, you have four variations for a test (Control, Variation1, Variation2, and Variation3). By default, VWO assigns a probability of 25% traffic to each variation. The total website traffic is distributed according to the following rules:
Scenario 1: If the traffic percentage to be included in the test is 100%
- A visitor arrives on your website.
- VWO randomly generates a number (R) from 0 to 1, 1 being exclusive.
- VWO checks the slot in which the random number lies and picks the variation associated with that slot. The slots are decided per the following rules:
- If R >= 0 and R <= 0.25, then VWO displays Control to the user.
- If R > 0.25 and R <= 0.5, then VWO displays Variation 1 to the user.
- If R > 0.5 and R <= 0.75, then VWO displays Variation 2 to the user.
- If R > 0.75 and R < 1, then VWO displays Variation 3 t the user.
Scenario 2: If the traffic percentage to include is 20%:
- A visitor arrives on your website.
- VWO reads the value of % traffic assigned in the test (say T = 0.2).
- VWO decides whether to exclude or include the visitor in the test, using the following criteria:
- VWO randomly generates a number (S) from 0 to 1, 1 being exclusive.
- If S lies outside 0 and T, that is, S > T, then VWO excludes the user from the test and sets an exclude cookie in the browser of the user.
- If S lies between 0 and T, that is, S >= 0 and S <= T, then VWO includes the user in the test and applies the same criterion used in Scenario 1 to decide which variation to show to the user.