Server side AB testing - guardian/support-frontend GitHub Wiki
Sometimes the scope of a test goes beyond what can be achieved in a client-side test, e.g. when it would hurt performance so much that results would be skewed. In these cases, server-side AB tests are your guys!
This page describes the approach introduced in this PR.
Advantages and disadvantages
Advantages
- Allows you to run tests that just won't work in javascript ie if you want to render a whole different page
- Avoid javascript rendering problems (eg a jump if a DOM element is rendered and then hidden)
Disadvantages
- Can only do AB tests, not multivariant ABC tests
- Users are re-allocated randomly on every page load
Configuration
In order to set up a test, pass a list of test names to generateParticipations. The participation will then be available on the server and is passed to the client through the main Twirl template.