Use Google Analytics for data to display on our webpage?

我只是一个虾纸丫 提交于 2019-11-29 10:45:51

So the question is if it's possible to use Google Analytics' API for updating the statistics on our webpages?

Yes, it is. But, the authentication process and xml return may slow things up. You can speed it up by limiting the rows/columns returned. Also, authentication for the way you want to display the data (if I understood you correctly) would require you to use the client authentication method. You send the username and password. Security is an issue.

I have done exactly what you described but had to put a loading graphic on the page for the stats.

If I cache the results is it more feasible? Or just occasionally update our stats?

Either one but caching seems like it would work especially since GA data is not real-time data anyway. You could make the api call and store (or process then store) the returned xml for display later.

I haven't done this but I think I might give it a go. Could even run as a scheduled job.

I absolutely love Google Analytics for our site metrics, but maybe there's a better solution for this particular need?

There are some third-party solutions (googling should root them out) but money and feasibility should be considered.

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