Server Side Testing


It is possible to write Server Side driven tests that work along Convert Experiences AB testing. The following article is meant to explain how can this be achieved.



  1. Determine if customers has been bucketed in experiment already.

    Read the _conv_v cookie and parse it according to the structure described here:

    Cookie Structure Article

  2. Determine if the experiment id is included in the cookie, and if it is read the variation id to which the visitor was assigned to.

    With the variation id, execute the logic associated with this variation.

    If the experiment id is not found, go to the next step.

  3. Generate a random number between 0 and 1 and use it do decide which variation is to be presented, based on number of variations you have on the test in question.

    Example: if you have 3 variations and number generated is 0.55 than the variation would be the second one. 

    Next you will need to id of the selected variation (second on the example), which you can get from REST Project Endpoint or just hard code the list of variations IDs for that experiment in your code (this more convenient and faster).

  4. To tell Convert which variation has been selected for this visitor write the following cookie.

    Name: _conv_sptest
    Value: experiment_id:variation_id (Replace it with the real values)
    Expiration: 10 seconds (This should be enough)

  5. Based on the selected variation do your internal logic, same as if variations was there from previously bucketed visitor as in Step 2.

  6. The experiment has to be set up. with a Site area that prevents it from firing, and be set to active. This could be achieved with including an unreachable Boolean JS condition
Have more questions? Submit a request