Pages

Tuesday, June 23, 2009

The Google Analytics API and PHP

The Google Analytics API allows developers to extend Google Analytics in new and creative ways that benefit developers, organizations and end users. Large organizations and agencies now have a standardized platform for integrating Analytics data with their own business data. Developers can integrate Google Analytics into their existing products and create standalone applications that they sell. Users could see snapshots of their Analytics data in developer created dashboards and gadgets. Individuals and business owners will have opportunities to access their Google Analytics information in a variety of new ways.

Google Analytics API PHP Class

Cris Hope has created a PHP class for accessing the Google Analytics API with CURL and using DOMDocument to parse the XML. The resulting class and example script can be downloaded here and there are a number of posts on this website showing how to use it.

Code Reuse

Feel free to use the class as you wish but if re-posting it on other websites or using it in your own projects or for your customers, please retain the notice in the analytics class file attributing the original work to Cris.

GA API Introductory Posts

The following posts cover a couple of things about the Google Analytics API:

Code examples

The following code examples have been posted for using the Analytics class:


Reblog this post [with Zemanta]

ShareThis