How to embed or recreate a Google Analytics Graph in a custom CMS

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 00:21:40
Carles Barrobés

I learned to use the Google Visualization API (the one used by analytics, and the one I believe you refer to) from the examples at https://developers.google.com/chart/interactive/docs and found it quite clear.

You can use examples of different graphs from the Gallery as well: http://code.google.com/apis/visualization/documentation/gallery.html

I created a service specifically for this purpose: EmbeddedAnalytics

You define your chart type (line, bar, horizontal bar), metrics (pageviews, visits, etc), dimension (date, country,etc), and a time frame. Then you simply embed a snippet of code into your site where you want the chart to appear.

Google now has an article specifically on this topic. https://developers.google.com/analytics/resources/articles/gdataAnalyticsCharts

Here is step-by-step guide how to embed Google Analytics chart into a webpage as interactive widget: http://explainum.blogspot.com/2011/04/how-to-add-google-analytics-chart-to.html

EDIT (5/15/2012): The link above goes to a blog post on Explainum -- 3rd party web-service which allows creating embeddable charts from various data sources including (and most popular) Google Analytics.

Connection to GA is made using OAuth. You will need to know your GA profile ID in order to connect. Data is updated every 2-24 hours. The service is free.

DISCLAIMER: I'm one of Explainum's creators.

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