Download the PHP package tixelrocks/abtest without Composer

On this page you can find all versions of the php package tixelrocks/abtest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package abtest

Simple A/B testing

Total Downloads Latest Stable Version Latest Unstable Version License

A very simple web A/B testing package for Laravel

Installation

You can use Composer to install this package easily:

Configuration

Configure your A/B experiments in config/ab.php file (not provided by default). Let's say we have a button somewhere on our website and we want to see what's a better call to action (text inside the button) - "Continue" or "Finish":

Picking the variant

Some users will see "Continue" (A version or "control" version), some will see "Finish" (B variant or "treatment" variant), this will be decided on a per-user basis, roughly at a 1:1 ratio based on a cookie that's set during the first visit by the Tixel\AbTest\SetAbTestCookie middleware that you can add to any route or all routes:

For easy local troubleshooting, you can also use a query parameter at any time:

Usage in templates

Locate the button in your Blade template, and replace the button text with our helper function or our Blade directive, passing the name of the A/B experiment from the config file:

Good! The text will now display as variant A and variant B depending on the user and the cookie in the browser, but we need to track the results. This package currently ships with Google Analytics and Segment components, but it's easy to add anything else.

Let's say we want to send an event to Google Analytics:

Of course, this can be two separate DOM elements:

We can add a global click handler that will send this to GA, from any button on any page:

Okay, now we have data about how many users clicked on each variant - A or B, but to accurately calculate conversion rates, it would be nice to see how many users SAW the variants A and B, so let's send page view data as well:

Result

Now it's easy to see how many users are seeing each version and how many are clicking. In a few weeks you can decide which option keep and which one to remove :)

Managing tests

To see what's currently active, you can run a console command shipped with this package that will find all uses of abTest() function in the templates:

You can expose this as a route as well:

To disable a test, either replace the abTest() function or @abTest directive with plain-text or comment out one of the options in the config file.


All versions of abtest with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
illuminate/support Version 5.*|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tixelrocks/abtest contains the following files

Loading the files please wait ....