7

I have a PHP web site, i want to show google analytics on my admin section. I wish to use Jquery or extjs.

user326096
  • 307
  • 1
  • 4
  • 11
  • Possible duplicate of [Show Google Analytics dashboard on my site](http://stackoverflow.com/questions/2490137/show-google-analytics-dashboard-on-my-site) – Cœur Apr 08 '17 at 02:27

5 Answers5

12

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/

ipalaus
  • 2,253
  • 4
  • 27
  • 42
  • 2
    What makes it not possible? From what I understand of your answer, you're describing a way to do it. – R. Martinho Fernandes Jan 13 '11 at 20:05
  • It's not possible to get jQuery and with a simple function print all the information. You can't show the panel. You've to build a panel like GA with the information you got from it. More clear? – ipalaus Jan 13 '11 at 20:08
  • @user326096: now, accept the answer and accept the other answers! ;-) – ipalaus Jan 13 '11 at 21:07
3

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.

Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
Luis
  • 31
  • 1
2

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.

  • Add more details on the API. –  Jun 15 '17 at 11:13
  • great! You've made your post better. You can check https://stackoverflow.com/help/how-to-answer to make your answer even better. –  Jun 15 '17 at 11:24
1

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

M Schenkel
  • 6,294
  • 12
  • 62
  • 107
0

the api have change and now, this is the documentation for that. Google Analytics api embed charts own panel

Mike Brian Olivera
  • 1,414
  • 1
  • 16
  • 21