PHP API for Google Analytics

丶灬走出姿态 提交于 2019-12-22 23:13:29

问题


I wanna start using Google Analytics PHP API.

I found 2 libraries and I can't understand which one should I use and what is the main difference between them: gapi-google-analytics-php-interface and google-api-php-client

P.S. The main reason to use this API is requirement to work with goals.


回答1:


google-api-php-client is for Google API's and not specifically for Google Analytics.

gapi-google-analytics-php-interface is a library that connects to your Google Analytics account and extracts data. You should use this client.

GAPI (said 'g,a,p,i') is the Google Analytics PHP5 Interface.




回答2:


Would recommend following this tutorial.

Hello Analytics

Although, as I recall, the latest github library did not match the script and I had to find a previous version.

If you get a bunch of include errors, check the folder structure. I ended up downloading the previous version (which matched) and have had no issues using GA API since.



来源:https://stackoverflow.com/questions/12794674/php-api-for-google-analytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!