Allen Gingrich Allen Gingrich - 1 month ago 18
Javascript Question

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

I would like to know how to create a graph with Google Analytics (maybe using the api), but I'm unsure if there is already a plugin or tutorial on how to do this. The Javascript API reference at Google.com sucks.

Also any reference to how to create a line graph (canvas element?) would be great too.

Thanks!

Answer

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