Adding Google Analytics to your Tableau Server
If you’re a Tableau Server administrator or Publisher of content to Tableau Server then you probably at some point wondered how popular your dashboards and views are. Tableau fortunately has a simple answer to that with their Server Admin views however, if you’ve ever wanted to know more about how your users are using your views, this post is for you.
Google fortunately offers an incredible service for free that helps us tracking many of the areas of interest called Google Analytics. You can sign up for free here: http://www.google.com/analytics/
Ignore the pie charts they display and go sign up for an account if you haven’t already.
You’ll need system admin rights on the Windows Server hosting Tableau itself.
- Navigate to the following location on your Tableau Server:
C:Program Files (x86)TableauTableau Server7.0wgserverz5WEB-INFappviewslayouts
- Make a copy of all the files in that directory and put them in a safe place (eg. source control, DropBox, etc.)
<!– Adding Google Analytics script Ben Sullins 2013-Jan-2 –>
var _gaq = _gaq || ;
var pluginUrl = ‘//www.google-analytics.com/plugins/ga/inpage_linkid.js’;
_gaq.push([‘_require’, ‘inpage_linkid’, pluginUrl]);
ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
var s = document.getElementsByTagName(‘script’); s.parentNode.insertBefore(ga, s);
- Notice I added an HTML comment in there as a reference. Make sure to do something similar to that as well.
- Restart the Tableau Service however you like, I prefer doing “tabcmd stop” and then “tabcmd start” from the command line.
- Go to your Google Analytics account and test that Google recognizes your setup as being installed.
From here you can go and build custom dashboards in Google Analytics or just use the standard reporting. Another neat feature is the real-time tracking. Here are some screenshots of mine which has been running for a week on a test environment. Click on the thumbnail for the full-size image.
Hope you enjoyed this! Cheers!
Visitor Flow: See how users navigate through your Tableau Server with this view
Standard Reporting – Audience Overview: High-level view of your Tableau Server utilization
Real-Time Analytics: Use this to see current users on the Tableau Server
In-Page Analytics: See where users are clicking and the browser sizes. Unfortunately this does not work inside dashboards/views.
Custom Dashboards: Hate pie charts as much as I do? Get rid of them in the standard Google Analytics dashboards and replace them with your own versions.