2017 © Pedro Peláez
 

library php-google-analytics-cookie-parser

image

waarneembemiddeling/php-google-analytics-cookie-parser

  • Friday, June 6, 2014
  • by krizon
  • Repository
  • 6 Watchers
  • 10 Stars
  • 3,022 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

php-google-analytics-cookie-parser

Build Status Scrutinizer Quality Score, (*1)

Parses the _ga analytics.js cookie to a ParsedCookie result which includes version, depth, client id and timestamp., (*2)

Usage

use Wb\GoogleAnalyticsCookieParser\GoogleAnalyticsCookieParser;

$string = 'GA1.2.230657868.1384941727';

$parser = new GoogleAnalyticsCookieParser();
$result = $parser->parse($string);

// Available properties
$result->getVersion(); // Output: GA1
$result->getDepth(); // Output: 2
$result->getClientId(); // Output: 230657868.1384941727

Acknowledgements

  • Thanks to Matt Clarke for his research on the analytics.js/_ga cookie format: https://plus.google.com/110147996971766876369/posts/Mz1ksPoBGHx

The Versions

06/06 2014

dev-master

9999999-dev

  Sources   Download

MIT

The Development Requires

by Kristian Zondervan

22/05 2014

0.1.0

0.1.0.0

  Sources   Download

MIT

The Development Requires

by Kristian Zondervan