Introduction
One of the Achilles heels of Google optimize as an AB testing platform is how they bucket users into experiments. Users are often placed into multiple experiments at the same time without the possibility of natively having the users bucketed into only a single experiment at a time. In this post I will highlight an approach to ensure that experiments are mutually exclusive i.e. a user will only be placed in a single experiment at a time.
Siloing Your Users.
When a user visits your website, we execute the following steps:
- Check if the guest has already been siloed, if not proceed.
- Generate a random number between 1-100.
- Create a cookie and store the number generated in the previous step.
if(!window.vuCookies.get('vu.silo')) {
window.vuCookies.set('vu.silo', Math.floor(Math.random() * 100)+1, 365);
}
*Note:
- The window.vuCookies is custom code.
- This code must be placed before the Google Optimize script.
Audience Targeting
Set the audience targeting condition on the experiment level.
Conclusion
In order to have accurate AB testing results its paramount that a user is not bucketed into multiple experiments. The approach outlined in this article will ensures tests remains mutually exclusive.
Top comments (0)