Server Side Testing

Overview

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


Tip

Process

  1. Determine if customers have been bucketed in the 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 the number of variations you have on the test in question.

    Example: if you have 3 variations and the number generated is 0.55 then 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, the same as if variations were there from the 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 by including an unreachable Boolean JS condition
Have more questions? Submit a request

Comments