티스토리 뷰
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:
- Basic data example getting the most popular pages
- Get the profile id from the accounts list
- Get data without a dimension
- Looping through the data
- Using filters
- Paging through result data
- Calculating a page's bounce rate
- Get data for a single page
ex]
http://www.electrictoolbox.com/google-analytics-api-php-class-most-popular-pages/
'dev > php' 카테고리의 다른 글
codeIgniter 모델에서 다른모델 가져오기 (0) | 2011.02.17 |
---|---|
구글 그래프 그리기 라이브러리.. (0) | 2011.02.14 |
PHP에서 웹 페이지 내용 또는 헤더 값 가져오는 코드 (0) | 2011.02.14 |
PHP용 트위터 OAuth연동라이브러리 twitteroauth 사용법 (0) | 2011.02.07 |
미투데이(Me2day) 오픈api를 이용한 인증 및 글쓰기 (0) | 2011.02.07 |