PHP Classes

PHP Google Analytics API Metrics Tracker: Track accesses to your API using Google Analytics

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 227 All time: 8,187 This week: 68Up
Version License PHP version Categories
ga-api-tracker 1.0.0BSD License5.0PHP 5, Statistics, Web services
Description 

Author

This class can track accesses to your API using Google Analytics.

It is a plugin for Zend Framework controller that send requests to Google Analytics API to record accesses to an API or Web pages implemented with the Zend Framework.

The class can track information about each request IP address, accept language and client ID using a cookie.

Innovation Award
PHP Programming Innovation award nominee
October 2015
Number 4


Prize: One year server license IP to country, region, city, latitude, longitude, ZIP code, time zone, area code database
Google Analytics is a very popular service used by many sites to track the audience of their Web pages.

However, it also provides an API that allows you to keep track of other types of events.

This package uses the Google Analytics API to keep track of the accesses to an API provided by a PHP site.

Manuel Lemos
Picture of Alexander Skakunov
Name: Alexander Skakunov is available for providing paid consulting. Contact Alexander Skakunov .
Classes: 9 packages by
Country: Ukraine Ukraine
Age: 42
All time rank: 232 in Ukraine Ukraine
Week rank: 164 Down4 in Ukraine Ukraine Down
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Documentation

This class helps to track your backend application usage in Google Analytics -- the requests made to your backend are logged in Google Analytics.

this is how it looks

Technically it uses the Mobile Tracking

PHPclasses.org class content is here

The class is done for my yasno.tv project.

You can reach me at alex.skakunov@gmail.com .

Requirements

The class is based on Zend Framework 1, so if you don't want to use it, the request\response\cookies management must be re-implemented in this class.

Installation

  1. Register at Google Analytics and get a tracking ID that looks like "UA-111111-11"
  2. Edit your application config and paste this line:

    google.analytics.tracking.code = UA-111111-11

  3. make sure you add this plugin in application/Bootstrap.php:

    protected function _initPlugins() { $front = Zend_Controller_Front::getInstance(); $front->registerPlugin(new Yasno_Controller_Plugin_Integration_Google_Analytics_Mobile_Tracker); }

That's it. You will have your backend script usage stats in Google Analytics in a while.

Notes

Clients of your API can set parameter "partner-id" and that will be used to track different users.


Screenshots (1)  
  • 1aaf13e8d7c06287eb4852be78f23248.png
  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file README.md Doc. documentation
Plain text file Tracker.php Class the class

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:227
This week:0
All time:8,187
This week:68Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1517