Basically you just wrap this around whatever part of your app you want to test, and then hook it up to your analytics tool of choice, and it keeps track of which users got which variant using localStorage .