Answer the question
In order to leave comments, you need to log in
How to conduct A/B testing using cookies?
I'm going to test a new site design. On the front and backend, I checked for cookies. If there is, then the new design, if not, then the old design. I was going to test on 10% of visitors. The problem is that google analytics requires 2 different page addresses (for example, site.ru and site.ru/new), while my options differ only in the presence of cookies. Is it possible for 10% of visitors to simply substitute a js code that will set a cookie and reload the page with a new design?
Answer the question
In order to leave comments, you need to log in
You should have 2 options for cookies, which are set in advance, and the server should keep a count of how many of which cookies you have already issued before. If the user does not have a cookie, then we choose which one to set based on this count. Simply put, you set cookie A for the first visitor, then 9 people receive B.
For google analytics, put utm tags in the url (you can use js through the history API)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question