Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-12-01 21:48:09

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

msd_ga_dashboard: Google Analytics Dashboard

Download

This simple Google Analytics Dashboard plugin adds an embedded Google Analytics dashboard, like the one shown in a demo on the Embedded API site, to the Textpattern Visitor Logs page.

Very simple. Not many features.

A client key must be obtained for your domain. Update the plugin preferences with your Client ID.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#2 2014-12-02 20:42:48

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

Great! I’ll try it out a.s.a.p. but your description and the demo shown seem like just what I was looking for. Big thanks!


TXP Builders – finely-crafted code, design and txp

Offline

#3 2014-12-02 21:21:59

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

I’ve made an update to allow you to select the view (profile) ID in the plugin preferences instead of on the visitors tab. If left blank the view selector will be displayed on the visitors tab.

Additionally the query used is now stored in the database so that advanced users could modify the value stored and get different output.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#4 2015-01-18 15:31:39

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

Hi Matt,

I’ve had a play with this now and I like the idea but wonder how I can extend it to show more information. Perhaps I’ve missed something elementary, but I only see the “Sessions” zig-zag. I’d like to add a full dashboard with more panels if I can.

You mention that the query can be customized in the txp_prefs and I can see various examples on Google’s Embed API Demos but looking at the examples with multiple panels (such as the Third Party Visualization demo), it looks like I need to add several successive queries, each with its own container div. The txp_pref contains just the query but the container and chart form (“Line”) is hard-coded in the plugin. Can I do that without editing the plugin code, or have I missed something fundamental?

If not, is there a way of creating a pre-assembled custom dashboard from within google analytics and then bringing that dashboard in wholesale to the txp Visitor Logs panel?

Or alternatively, perhaps the ability to use a txp form (like with smd_tabber) to assemble one’s own analytics dashboard, either as HTML or perhaps using the Polymer Elements framework that google provides for the analytics widgets (docs here). For example something akin to the stuff contained within the body tags here.

BTW: the Google Developers Console seems to be new and had me thrown to begin with. and I saw no option for the Simple API Key. I chose “APIs & Auth > Credentials” in the menu and then “Create new Client ID” under OAuth and then “Client ID for web application”, added my domain and then used the Client ID string from that the key. Was that correct?


TXP Builders – finely-crafted code, design and txp

Offline

#5 2015-01-20 16:29:59

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

Sounds like your doing it right and haven’t missed anything. I couldn’t think of a good way to provide more than just the basics in this plugin and keep it flexible enough to meet the needs of most people. I also couldn’t get the Polymer Elements framework working.

I think smd_tabber would be the simplest solution if you are comfortable tweaking the examples to fit your needs.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#6 2015-01-20 18:22:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,578
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

Thanks for replying, Matt.

How about farming out the query, chart type and the html container id currently hard-coded into the plugin into txp forms, for example msd_ga_dashboard_html and msd_ga_dashboard_js (or _query). That way they’d be there as the standard variant but people could extend and adapt them as required to assemble their own layouts.

Thinking aloud (again!), might there be a case for a msd_ga_dashboard_css form too? Or alternatively, given that most users are likely to keep the admin theme styling but will only want to arrange perhaps two or three panels in a row, provide some standard layout classes in the plugin (e.g. .1-col, .2-col, .3-col panels) that people can use in their html form to corral the analytics panels into a layout of sorts.


TXP Builders – finely-crafted code, design and txp

Offline

#7 2015-01-20 18:51:51

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

I like the idea, I’m not likely to have time to implement it any time soon.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#8 2015-01-21 09:07:48

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

Hum.. how get Analytics Table ID??

Offline

#9 2015-01-21 16:21:43

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: msd_ga_dashboard: Google Analytics Dashboard

In Google Analytics goto Admin – View Settings and it is the View ID.

But the options page for the plugin will also help you look it up.

Last edited by MattD (2015-01-21 16:22:18)


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB