Classifying users with control group or variant already happens when the tracker initializes and is already determined when evaluating the personalization. However, it is during evaluation that we can only determine if variables used are present or meet the conditions. This means that if you use variables or product information, your specified distribution ratios may not always be respected due to technical limitations.
Distribute equally among variables
Classifying users with control group or variant already happens when the tracker initializes and is already determined when evaluating the personalization. However, it is during evaluation that we can only determine if variables used are present or meet the conditions. This means that if you use variables or product information, your specified distribution ratios may not always be respected due to technical limitations.
A workaround for this is to set up your own control group variant with an identical variable. That way, it does not matter whether they are in the real variant or your own control group, the filter applied is identical.
Sample scenario
You have a personalization that contains the following code:
This product is {{ product_conversion_amount | time_window('lastweek') | minimum(10) }} ordered last week
And then set the distribution as follows:
Suppose you have 100 users on your site, our system will divide these users 50/50: one half belongs to the control group and the other half does not. Then the 50 users belonging to your variant will surf to the corresponding page where this personalization is running.
At that point, our system verifies that the minimum / time_window requirement is met. If only 10 visitors out of the 50 in the variant group view a product that has been sold at least 10 times in the past week, this means that the remaining 40 visitors will still not see personalization.
As a result, you get to see in your statistics that 50 visitors “saw” the control group and 10 visitors saw your variant. We can't possibly count the remaining 40 visitors with your variant because they didn't actually see it, nor can we retroactively assign them to the control group.
Solution
You delete the control group and create a new variant. The type can be the same as your real variant, although in principle you can choose a different one since we are going to hide it to achieve a control group ourselves. Note: when you choose an embedded one, do not replace the chosen query selector otherwise you might change the layout of your website.
In the same input field as before, you place an identical variable, so you copy, for example, what you had before:
This product is {{ product_conversion_amount | time_window('lastweek') | minimum(10) }} ordered last week
Next, place the following code in the CSS field:
{{cssPrefix}} {
display:none!important;
}
{{cssPrefix}} generates the unique ID of the variant personalization, and then we hide the entire personalization. This leads to people who see this variant actually seeing your website without any changes, so this acts as a control group.
So in the above scenario, that would mean that both the 50 people in your real variant, and the 50 in your own control group, see the minimum filter applied. So then, in theory, both groups would show about 10 visitors in the statistics.
This will not result in an exact 50/50 split as one group may view more eligible products than the other, but it is as accurate an approximation as possible.