2017 © Pedro Peláez
 

library laravel-measurement-protocol

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

image

ash/laravel-measurement-protocol

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

  • Monday, March 24, 2014
  • by Ash
  • Repository
  • 1 Watchers
  • 4 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel Measurement Protocol

An Analytics Measurement Protocol client for Laravel. This simply provides a static interface for Krizon's PHP client., (*1)

Example

Use it just like Krizon's PHP client, but without the need to instantiate, pass a tid (this is taken from config.analytics.tid), or pass a cid (this is picked up from the _ga cookie, although it can also be manually passed)., (*2)

MeasurementProtocol::event(array(
    'ec' => 'Contact Form',
    'ea' => 'Submit',
    'ev' => 1
));

Install

Using Composer:, (*3)

composer require ash/laravel-measurement-protocol:dev-master

Service Provider

Add the service provider Ash\LaravelMeasurementProtocol\LaravelMeasurementProtocolServiceProvider., (*4)

Alias

Optionally add an alias, like so:, (*5)

aliases => array(
    'MeasurementProtocol' => 'Ash\LaravelMeasurementProtocol\LaravelMeasurementProtocolClient'
)

Config

You'll need an Analytics config that exposes your tracking id (tid). For example, create a config file at app/config/analytics.php containing:, (*6)

<?php

return array(
    'tid' => 'UA-XXXXXXX-X'
);

The Versions

24/03 2014

dev-master

9999999-dev

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

  Sources   Download

The Requires

 

by Avatar Ash

24/03 2014

0.0.3

0.0.3.0

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

  Sources   Download

The Requires

 

by Avatar Ash

25/02 2014

0.0.2

0.0.2.0

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

  Sources   Download

The Requires

 

by Avatar Ash

24/02 2014

0.0.1

0.0.1.0

A Laravel wrapper for Krizon's Google Analytics Measurement Protocol PHP Client.

  Sources   Download

The Requires

 

by Avatar Ash