Mobile app version of vmapp.org
Login or Join
Si4351233

: Embed Google Analytics Reports On Website I want to embed Google Analytics charts into my website so that from the admin console I can view certain analytics charts without needing to log into

@Si4351233

Posted in: #GoogleAnalytics #Javascript

I want to embed Google Analytics charts into my website so that from the admin console I can view certain analytics charts without needing to log into the Analytics console. I have come across the Analytics data API which requires OAuth to make it work but the problem is that I want any user with admin access to be able to see the analytics data without needing to register them into Google Analytics (which means OAuth won't work).

Does anyone know how I can achieve this. Would prefer a straight javascript solution rather than needing to route it through the web server.

Thanks in advance.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

3 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Okay, having gone through all the documentation and having spoken to Google I have found out that this is not possible at this time. Due to the inherent insecurity of javascript Google does not recommend directly providing read access to the data through a javascript API without some high level of security. The only way Google provides access to this data through the javascript API is with an OAuth authenticated session which requires the user to be logged into Google at the time plus having at a minimum read access to the Analytics profile.

As an alternate solution to this having done a range of research online I came across a good alternative named Piwik which is a PHP based website analytics engine which works much the same as Google Analytics but which runs on your own server as a PHP web application and is a lot easier to embed reports from. In Piwik I have been able to directly embed reports using <iframe> and I only need to pass a token code for a read only user to the iframe source URL to enable accessw. The beauty about this is that I am not limited to certain reports only, rather any chart, graphic, or report which I can access through the Piwik application I can embed in my site using an iframe as well as being able to directly query the data using the API.

10% popularity Vote Up Vote Down


 

@Nimeshi995

I stopped using Google Analytics, but they may still have an email feature that you can setup to send you regular notifications on stats. If you can use that, set up a way to get those emails auto posted to your website some place.

10% popularity Vote Up Vote Down


 

@Phylliss660

Josip Ivic (above) suggested a link. I went to look at this way way (way) cool site and thought of a work-about. Use: ga-dev-tools.appspot.com/spreadsheet-add-on/ and embed the spreadsheet. Avoid iframes for security risks. ALSO: NOTE MY DISCLAIMER - You may or may not be allowed to do this. You may or may not be risking security issues as well.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme