AB is a server-side A/B testing tool for Laravel applications and provides a pretty simple feature set that is a great free alternative to services like Optimizely. It allows you to experiment with different variations of your website while test selection will be handled automatically.
Install using composer:
composer require bart/ab
Add the service provider to app/config/app.php:
Register the AB alias:
'AB' => Bart\Ab\Facade::class,
Publish the included configuration file like this:
The above (default) configuration will display teaser version 2 to 50% of your users, whereas version 1 and 3 will be displayed to 25% of your users each.
After you have defined your tests and enabled testing in the config you can start designing your A/B tests. It's as easy as 1-2-3 because the only thing you need to do is displaying a different peace of content for each test. Let's assume you have defined the tests from above, your view could look like this:
Teaser 1 is being displayed
Teaser 2 is being displayed
Teaser 3 is being displayed
This package doesn't handle any goal or conversion tracking because every company is approaching this in a slightly different way. We would suggest to use a custom Google Analytics dimension and pass the assigned test version in your master view: