The Javascript SDK has built-in functions for splitting users into separate A|B slices. We use a standard approach of splitting by users, because we want to compare a world where users consistently see our recommendations, versus a world where they consistently do not see our recommendations. We strongly recommend using our user hash for A/B testing, but are compatible with other A|B test handling tools available.

1. Generate User Hash

The LiftIgniter SDK offers a user hash that you can use to split users between our slice and the control slice. The user hash is a 32-bit integer hash of the user cookie. It is accessible as:



2. Generate A|B Test Slice

Our SDK allows you to create an A/B test slices that is obtained by taking the hash modulo 100. This creates a total of 100 bins numbered 0 through 99. This slice is accessible using a callback function in our SDK:


$p("abTestSlice", {callback:function(x){console.log(x);}})

In a 50/50 split, if a user's hash falls into buckets 0 - 49, they would see recommendations powered by one of the two systems being tested. If they are in bucket 50 or above, they would see the other. They will remain in their assigned test bucket until the test is over, or until they clear their cookies.

If you are not using our hash and splitting method for A/B testing, please let us know so we can review your bucketing methodology or test handling tool and provide insight on exactly how it might affect results.

Forcing entry to an A|B test slice

If you would like to force a specific hash value to make Q/A or recommendation testing easier, you can add URL parameter igniter_abhash. i.e. adding &igniter_abhash=10 to URL on browser will force the hash value to be 10. So if you've set up the abTestSlice logic to show LI recommendations when value is less than 50, setting it to any value between 0 - 49 will show LiftIgniter's recommendations.