Wallogit.com
2017 © Pedro Peláez
Blade level AB tests for Laravel 5
An A/B Testing suite for Laravel which allows multiple and nested experiments., (*2)
This will create trackable experients with as many conditions as you'd like. And will track conversion on each experiment based on keywords provided., (*3)
You can have nested experiments, its conditions are regular VIEW outputs making experiments easy to add/remove from your projects., (*4)
Install using composer or which ever means you prefer, (*5)
composer install comocode/laravel-ab
then add the service provider to your app.php in config/ folder like so, (*6)
..Illuminate\Validation\ValidationServiceProvider::class, ..Illuminate\View\ViewServiceProvider::class, ComoCode\LaravelAb\LaravelAbServiceProvider::class
Once you have registered the service provider. You can run php artistan
and see the following output:, (*7)
ab:migrate migrates Laravel-Ab required tables ab:rollback removes Laravel-Ab tables ab:report <experiment> --list outputs statistics on your current experiments or the one specified in the command
you can run ab:migrate to create the required tables, and ab:rollback to remove them anytime you wish to view your experiment results, use the export command to see statistics, (*8)
There are a few PHP A/B and other Laravel packages available., (*9)
This project focuses on providing the ability to test multiple experiments including nested experiments with a very easy to use blade interface., (*10)
</div>
@ab('My First Experiment') ///// the name of the experiment
@condition('ConditionOne') /// one possible condition for the experiment
<div class="uk-grid">
<div class="uk-width-1-1 uk-text-center">
@ab('My Nested Experiment') /// an experiment nested within the top experiment
@condition('NestedConditionOne')
<h3>Some tag</h3>
@condition('NestedConditionTwo') /// some values
<h3>Some other tag</h3>
@condition('NestedConditionThree')
<h3>Another tag</h3>
@track('NestedGoal') /// the goal to track this experiment to
</div>
</div>
@condition('ConditionTwo')/// condition for top level test
<h1> other stuff </h1>
@track('TopLevelGoal') /// goal for top level test
to reach an event simply do, (*11)
@goal('NestedGoal')
in the targed page or by utilizing app()->make('Ab')->goal('NestedGoal') anywhere in your application execution., (*12)
if you would like to throttle the decision towards specific conditions you can add a declaration to control the distribution. For example, (*13)
@ab('My Nested Experiment') /// an experiment nested within the top experiment
@condition('NestedConditionOne [2]')
<h3>Some tag</h3>
@condition('NestedConditionTwo [1]') /// some values
<h3>Some other tag</h3>
@condition('NestedConditionThree [1]')
<h3>Another tag</h3>
@track('NestedGoal') /// the goal to track this experiment to
Will randomly select a result but will calculate the odd of the result based on the sum of the weights (1 + 1 + 2 = 4) vs its specific weight 2/4, 1/4 1/4., (*14)
Once an experiment is executed, it will remember the options provided to the user so experiment choice selections do not change upon revisiting your project., (*15)
A experiment is recorded per instance and goals are tracked to the instance allowing for aggregation on results per condition., (*16)
Please feel free to contribute as A/B testing is an important part for any organization., (*17)
Add queable job to send reports on cron Add HTML charts, (*18)