2017 © Pedro Peláez
 

library ab

A/B testing tool for Laravel apps

image

bart/ab

A/B testing tool for Laravel apps

  • Friday, October 27, 2017
  • by bart
  • Repository
  • 0 Watchers
  • 6 Stars
  • 805 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 13 % Grown

The README.md

Laravel A/B Testing

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., (*1)

Installation

Install using composer:, (*2)

composer require bart/ab

Add the service provider to app/config/app.php:, (*3)

Bart\Ab\ServiceProvider::class,

Register the AB alias:, (*4)

'AB' => Bart\Ab\Facade::class,

Configuration

Publish the included configuration file like this:, (*5)

php artisan vendor:publish --provider="Bart\Ab\ServiceProvider"

Next, edit the config/packages/bart/ab/config.php file. The following configuration options are available:, (*6)

Enabled

Enables or disbales the A/B testing., (*7)

'enabled' => true

Default

If A/B testing is disbaled, AB::getCurrentTest() will return this., (*8)

'default' => 'none'

Tests

An array of test identifiers with an assigned level of distibution., (*9)

'tests' => [
    'teaser1' => 1,
    'teaser2' => 2,
    'teaser3' => 1,
]

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., (*10)

Usage

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:, (*11)

@test('teaser1')
    Teaser 1 is being displayed
@endtest

@test('teaser2')
    Teaser 2 is being displayed
@endtest

@test('teaser3')
    Teaser 3 is being displayed
@endtest

Tracking

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:, (*12)

dataLayer.push({'version': '{{ AB::getCurrentTest() }}'});

Contribution and questions

If you have any questions or suggestions please feel free to ask or create megre request. Happy testing!, (*13)

The Versions

27/10 2017

dev-master

9999999-dev https://github.com/bart/ab

A/B testing tool for Laravel apps

  Sources   Download

MIT

The Requires

 

by Rene Bartkowiak

laravel testing ab split optimizely

27/10 2017

v1.1.0

1.1.0.0 https://github.com/bart/ab

A/B testing tool for Laravel apps

  Sources   Download

MIT

The Requires

 

by Rene Bartkowiak

laravel testing ab split optimizely

18/07 2017

v1.0.0

1.0.0.0 https://github.com/bart/ab

A/B testing tool for Laravel apps

  Sources   Download

MIT

The Requires

 

by Rene Bartkowiak

laravel testing ab split optimizely