Used to track usage inside your php web application, you can add hooks to report to 'pages' on google analytics to track users action inside your app.
Very useful.
EXAMPLE:
// Initilize GA Tracker
$tracker = new GoogleAnalyticsTracker('UA-XXXXXXXX', 'myanalyticsdomain.com');
// Assemble Visitor information
// (could also get unserialized from database)
$visitor = new GoogleAnalyticsVisitor();
$visitor->setIpAddress($_SERVER['REMOTE_ADDRESS']);
$visitor->setUserAgent($_SERVER['HTTP_USER_AGENT']);
$visitor->setScreenResolution('1024x768');
// Assemble Session information
// (could also get unserialized from PHP session)
$session = new GoogleAnalyticsSession();
// Assemble Page information
$page = new GoogleAnalyticsPage('/analytics/yourfakepage');
$page->setTitle('fake page topic');
// Track page view
$tracker->trackPageview($page, $session, $visitor);
Lega note: This is NOT developed by alon carmel originally. its developed by http://code.google.com/p/php-ga/ by Thomas Bachem tb@unitedprototype.com. i just modified the code to work without namespaces using php5.x and not 5.3and up. all the rights belong to thomas bachem.
A very good set of classes, nicely documented and commented.
A very good port. Just configure the autoload and it will work.
This is a nice class and very useful, but had some issues:
since is a port from an open source project need more improvements to make it unique, also the documentation is crappy (or inexistent).
Questions & Comments