Show Google Analytics dashboard on my site
I 开发者_如何学编程have a PHP web site, i want to show google analytics on my admin section. I wish to use Jquery or extjs.
The first thing you've to know is that this is not possible. You need to use the GA API to get the data and then render it: http://code.google.com/intl/en/apis/analytics/docs/
More: Here you have a library in PHP to access easily to your GA data: http://code.google.com/p/gapi-google-analytics-php-interface/
I do something similar using a 3rd party application called Reporting Suite and it works perfectly for me. I get my metrics in a image that is published in our admin application.
You can embed Google Analytics to your webpage using Analytics Embed API, here's a link to the guide by Google.
Embed API Link
Using the sample code on the website will help you create a Access Google Analytics button on your page, logging in with which your dashboard is embedded to your webpage.
If you don't mind using a 3rd party service check out EmbeddedAnalytics. No programming necessary. It uses the Google Analytics API. All you do is define your chart and embed a snippet of code embedded in an iframe tag.
(disclosure: this is a service I have developed).
the api have change and now, this is the documentation for that. Google Analytics api embed charts own panel
精彩评论