When a new user enters your site, you can give him a random version.
However, you do not want that the version changes while the user is
visiting your site. So if a user clicks a link, that next page has to
be loaded with the same version. This can be accomplished with sessions
or cookies.