This project is not covered by Drupal’s security advisory policy.

This is a low-level API for implementing A/B tests in code.

Its design is based on the excellent A/Bingo for Ruby on Rails, written by Patrick McKenzie.

PLEASE NOTE: This module doesn't provide a UI for creating tests - they must be created in code. If you're looking for module to create A/B tests in the UI check out Multivariate.

Unfortunately, the Multivariate module isn't good for creating tests in code or that involve a lot of code. For example, let's say you're writing a custom module and you want to test two variations on a custom form.

The A/B test module will allow you to do that with only two lines of code!

Super quick tutorial

Showing your two variants:

if (abtest('mytest')) {
  // the first version
else {
  // the second version

Tracking conversion:


Project information