PHP A/B Testing with Redis is code you can include in your PHP web application to A/B test
To set up this project:
- Start up redis. Specify the host name and db number in config/configure.php
- Define things to measure in config/metrics.php following the declaration pattern in the file's example
- Define the tests you'd like to perform in config/tests.php following the pattern there. Specify a metric for each test as shown in the example
- include core.php in your code.
- make sure to set ab_participant_specify_id("a_unique_id_for_this_user") at least once
- for every metric, call: ab_track("name_of_your_metric");
- every time you need a choice, call: ab_test("name_of_your_ab_test"); and it will return a string represing the alternative to use
that is all.