티스토리 뷰

 

http://www.electrictoolbox.com/google-analytics-api-and-php/

 

Google Analytics API PHP Class

I have 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.

Last Updated

The analytics class was last updated on May 28nd 2009 at 10:51am NZST.
The example script was last updated on May 28th 2009 at 10:55am NZST.

Both files are in the .tar.gz file available for download.

Please note: This API is no longer under development and is not supported.
Try this page and this page over at Google code for other PHP APIs. For some reason Stig Manning's is the only one listed on the second page so check the first page as well because there are a couple more there as well.

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 me.

If you are using my class and would like to be added to my Who's using my Google Analytics API PHP Class? page please send me an email and I will add you.

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:

 

ex]

http://www.electrictoolbox.com/google-analytics-api-php-class-most-popular-pages/

공지사항