PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
  Info   View files Documentation   Screenshots Screenshots   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (2)    
Last Updated Ratings Unique User Downloads Download Rankings
2015-10-12 (4 years ago) RSS 2.0 feedStarStarStar 58%Total: 217 All time: 8,086 This week: 323Up
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
Name: Alexander Skakunov is available for providing paid consulting. Contact Alexander Skakunov .
Classes: 9 packages by
Country: Ukraine Ukraine
Age: 37
All time rank: 221 in Ukraine Ukraine
Week rank: 687 Down12 in Ukraine Ukraine Down
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

 

Details

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  
  • 1aaf13e8d7c06287eb4852be78f23248.png
  Files folder image Files  
File Role Description
Accessible without login Plain text file README.md Doc. documentation
Plain text file Tracker.php Class the class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:217
This week:0
All time:8,086
This week:323Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1526