Download the PHP package ringierimu/experiments without Composer

On this page you can find all versions of the php package ringierimu/experiments. 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 experiments

SDC Experiments Laravel Package 🧪

Tests Lint Code Base

About The Project

A Laravel package to determine a user's experiment group and track that user's group in Google Tag Manager

Prerequisites

Installation

Run the following in your project route:

After all the dependencies have been brought down, install the experiments package by running

This will import the config/experiments.php file into your application

Update your config config/experiments.php to include your running experiments. For example, for a recommend experiment your config will look like this

The array keys are your running experiments, the array value is the varaints (optional). If you want to map a particular user group to a key. In the case of a recommendation engine, you can map user groups to engine variants. If you don't need variants, you can just leave a blank array

Usage

Add the middleware

Add this to your web Http Kernel middleware groups.

This will ensure the user's cookie has the correct experiment groups set.

Check experiment group

when running an experiment, you need to present the user with a particular experience. To check whether the user is in test or controlcohorts use the helper SdcExperiments::getOrStartExperiment

Track the User's Group

In your tracking datalayer you need to send through an extra dimension that represents the user's experiment groups. To do this use the track_experiments helper.

This will send through experiment data to GTM for reporting.

Optionally setup Google Optimize Server Side tracking

As an additional extra you can also track your experiment via Google Optimize with their Server Side tracking configuration. More information about the required experiment settings can be found in the official Google Optimize docs.

Assuming you have followed the steps and have an experiment setup and ready to run you can now define how the A/B tests you have setup should be grouped and reported.

Only 2 buckets are supported at this tim for each a/b test, 0=control, 1=test

Scenario - A/B test

in config/experiments.php define a new group with a readable key (this can be the same key that you used for the a/b test itself)

Assuming the user is in the control group The GTM tracking vars created for this will appear as follows (other vars snipped for clarity):

Scenario - Multivariant test

building upon the previous example, assuming we want to run a multivariant test (multiple a/b tests simultaneously with similar or connected changes)

Assuming the user is in the control group for ab_test, test group for large_font, and control group for obnoxious_colours
The GTM tracking vars created for this will appear as follows (other vars snipped for clarity):

GTM Setup

GA needs the value of ga_optimize_exp from the dataLayer to be set to the exp field. Running GA directly it would look a bit like ga('set', 'exp', 'GOOGLE_OPTIMIZE_EXPERIMENT_ID.0!MULTIVARIANT_GOOGLE_OPTIMIZE_EXPERIMENT_ID.1-0');' Via GTM, in the Google Analytics settings var, under Fields to Set, set the field name exp to the value of the dataLayer variable ga_optimize_exp
The other vars pushed to the dataLayer are convenience vars that you could use to segment user traffic, call additional GTM scripts, etc Access specific experiment values via experiments.obnoxious_colours (for example)


All versions of experiments with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
ext-json Version *
illuminate/support Version ^6|^7|^8|^9|^10.0
spatie/laravel-googletagmanager Version ^2.5
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 ringierimu/experiments contains the following files

Loading the files please wait ....