| Package Data | |
|---|---|
| Maintainer Username: | Ash |
| Package Create Date: | 2014-02-24 |
| Package Last Update: | 2014-03-24 |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-12-14 03:07:30 |
| Package Statistics | |
|---|---|
| Total Downloads: | 44 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 4 |
| Total Watchers: | 1 |
| Total Forks: | 2 |
| Total Open Issues: | 0 |
An Analytics Measurement Protocol client for Laravel. This simply provides a static interface for Krizon's PHP client.
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).
MeasurementProtocol::event(array(
'ec' => 'Contact Form',
'ea' => 'Submit',
'ev' => 1
));
Using Composer:
composer require ash/laravel-measurement-protocol:dev-master
Add the service provider Ash\LaravelMeasurementProtocol\LaravelMeasurementProtocolServiceProvider.
Optionally add an alias, like so:
aliases => array(
'MeasurementProtocol' => 'Ash\LaravelMeasurementProtocol\LaravelMeasurementProtocolClient'
)
You'll need an Analytics config that exposes your tracking id (tid). For example, create a config file at app/config/analytics.php containing:
<?php
return array(
'tid' => 'UA-XXXXXXX-X'
);