How to launch A/B test on PHP in 5 minutes?

The ABRouter is an open-source, developer-oriented tool for implementing managed A/B tests with high-level PHP support.
The service providing a clear web interface to manage experiments, powerful API to run and track results of the tests in your PHP application.

Installing via composer package for Laravel.
Please, checkout out package GitHub Repository.
Takes minutes to start your first A/B test.
Additionally, we have the packages for Symfony and Laravel:

Symfony Guide
Laravel guide

Start for free

Image

Why do we need A/B tests?

Long story short - to improve conversions. The main advantage of AB-testing is making the right decisions.

Real world example: you have a two implementations of free trials on your website. In the first case, you require a card number to sign up, and for the second your user can proceed to the platform without the card. What is the best choice in that case?

AB test with two branches can show you the right answer. Your decision will be based on the number of completed sign-ups and the final number of the paid users in these branches.

Start for free
Image

Our first task with A/B test

Task definition
Our task is testing the most convertible color of form button. For example, your current color of sign up button is blue, but you want to check, what if the green button will be more convertible?
Goal:
to test most convertible color of form button
Branches:
red - 33%, green - 33%, blue - 33%.
Technically:
assign the color of the button: which the user got into.

Creating first A/B test on ABR side

So, there are the step to be done:
Step 1: Sign-up by the link
Step 2: Create your experiment
Pay attention to the Experiment ID. You will use it as the identifier of experiment to run it.
Step 3: Grab the data
After creating the A/B test you can to get the important data to run it.
Experiment id:

Token:

Application side | start coding

Step 1: Install
Install the library to your codebase on PHP:

composer require abrouter/abrouter-php-client
https://github.com/abrouter/abrouter-php-client
Step 2: Code
We are ready to code. There I'm using PHP-DI for DI, but you can use anything instead.
Step 3: There are our results
Color of the button will be automatically changed on each request for every page reload. Because we have used uniqid(). ABRouter system will memorize the relation between user identifier and branch he got, so if we will repeat the request with the same user identifier we will get the same branch as on previous run.

You're don't need to implement it on your own

Because we already did it in a perfect way in ABRouter open-source platform for A/B testing and feature flags!

Branch memorization & User identifiers association
ABRouter system will keep the user in the same branch after he got it the first time. It’s important to keep the user in the same branch all the time. With user identifiers association we will accept the relations between permanent user id and guest user id and keep the user in the same branch. Make an association through sending both identifiers in single statistic event.
Viewing statistics by branch
We will match the branch with the users events and show you detailed statistics which will help you to decide the better performed branch to make it base line.
Useful UI
We have implemented first-class UI to manage your A/B tests, feature flags and viewing statistics. It will help you to make the important decisions on your product and increase the your product growth.

Start tracking your A/B test

You can learn more about tracking user events in the docs. Tracking user events is important for making decisions on your experiments. After implementing the sending of events you can see the statistics by users which got into the experiment. ABRouter supports viewing the stats by the experiment and over all statistics.

Getting started is easy

Find key revenue drivers with ABRouter
Create your first A/B test

Summary

I show you how to implement an A/B test on PHP via ABRouter. Looks like it's quite simple.
Please, remember, that every change that you are making to the app should be through an A/B test. It's a key to build a successful product.

If you have any questions, feel free to ask me at abrouter@proxiedmail.com or via green "Ask Us" button here.

Image
Alex Yatsenko Senior Developer at ABRouter