Tracking Dashboard Usage
Dashboards have Google Analytics and Mixpanel event tracking integrated. This means you can record detailed information on how your dashboards are used, including:
- View counts, for the whole dashboard and per dashboard tab
- Filtering, including filters used
- Export usage, including name of table/chart exported
- Explore usage, including name of table/chart explored
The key difference between Google Analytics and Mixpanel is that Mixpanel can provide user-level detail about actions that were taken on your dashboard (including user names), whereas Google Analytics explicitly disallows this and provides a more aggregate view of dashboard actions.
If you wish to see the difference yourself, you may run both types of tracking on your dashboards at once.
Mixpanel
Enabling tracking
- Get a Mixpanel account (free for the first 25,000 events at time of writing).
- Once logged in to Mixpanel, click Account at the top-right.
- Click the Projects tab.
- Copy and paste the value for Token: somewhere. You'll need this soon.
- In Displayr, go to your company settings.
- Click on Edit theme CSS/HTML (advanced).
- Append the following snippet to the bottom of the Header HTML box, replacing YOUR_API_KEY with the Token value you copied earlier. (You may not use Mixpanel's snippet as it will not work.)
<script type="text/javascript">(function (e, b) { if (!b.__SV) { var a, f, i, g; window.mixpanel = b; a = e.createElement("script"); a.type = "text/javascript"; a.async = !0; a.src = ("https:" === e.location.protocol ? "https:" : "http:") + '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js'; f = e.getElementsByTagName("script")[0]; f.parentNode.insertBefore(a, f); b._i = []; b.init = function (a, e, d) { function f(b, h) { var a = h.split("."); 2 == a.length && (b = b[a[0]], h = a[1]); b[h] = function () { b.push([h].concat(Array.prototype.slice.call(arguments, 0))) } } var c = b; "undefined" !== typeof d ? c = b[d] = [] : d = "mixpanel"; c.people = c.people || []; c.toString = function (b) { var a = "mixpanel"; "mixpanel" !== d && (a += "." + d); b || (a += " (stub)"); return a }; c.people.toString = function () { return c.toString(1) + ".people (stub)" }; i = "disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" "); for (g = 0; g < i.length; g++) f(c, i[g]); b._i.push([a, e, d]) }; b.__SV = 1.2 } })(document, window.mixpanel || []); mixpanel.init("YOUR_API_KEY", {}, "tracker2"); window.mixpanelTrackers = (window.mixpanelTrackers || []); window.mixpanelTrackers.push("tracker2"); </script>
- Click Save.
- Test a dashboard to make sure you haven't caused harm.
Viewing tracking reports
Mixpanel's dashboard is entirely for viewing tracking reports and is intuitive.
Viewing user tracking reports
In Mixpanel, click PEOPLE > Explore. Search for the user, then click their name to see their most recent activity (events).
Google Analytics
Enabling tracking
To start recording this information for your dashboards:
- Get a Google Analytics account.
- Find your tracking snippet and note your tracking ID in the snippet:
_gaq.push(['_setAccount', 'UA-XXXXX-Y']); - In Displayr, go to your company settings.
- Click on Edit theme CSS/HTML (advanced).
- Append the following snippet to the bottom of the Header HTML box, replacing UA-XXXXX-Y with your tracking ID. (You may not use Google's snippet as it will not work.)
<script type="text/javascript"> var secondaryWebQTracker = true; var _gaq = _gaq || []; _gaq.push(['t2._setAccount', 'UA-XXXXX-Y']); _gaq.push(['t2._setDomainName', 'displayr.com']); </script>
- Click Save.
- Test a dashboard to make sure you haven't caused harm.
The dashboard events will start to appear in your Google Analytics reports after 24 hours.
Viewing tracking reports
With your Google Analytics account you will be able to see the usage of your dashboards as Events. Events can be viewed in the Google Analytics interface under Standard Reporting > Content > Events.
Translating from dashboard to Google Analytics terms:
- the name of your dashboard is the event Category,
- the viewer's dashboard action - such as viewing a tab or filtering - is the event Action, and
- contextual information about the viewer's dashboard action - such as the title of the viewed tab or the names of filters applied - is the event Label.
To view the events for a dashboard, click on one of the Event Category (dashboard) names. This will drill down into events just for that dashboard. Then click Event Action next to Primary Dimension:. This will show you the action names, such as "View Tab" or "Export Item". Then click the Secondary dimension dropdown, type event in the filter box and select Event Label. You now have an exhaustive listing of events by labels, so you can see which of your dashboard tabs were viewed and how many times they were viewed.
Viewing user tracking reports
The standard Google Analytics event reports show data aggregated by dashboard. With some difficulty, you can also view activity by user. If this is your main need for analytics, we recommend using Mixpanel instead.
Once you have a Standard report, created as described above, click Customize. Then you may either add a Filter or Dimension Drilldown according to a user ID number. In search box, enter custom, and then select Custom Variable (Value 02); this custom variable contains the user ID that performed the action. Use a Filter to view the actions of a particular user; use Dimension Drilldown to view all actions broken down by all users.
To view the user IDs your dashboards have collected so far, in your Google Analytics dashboard click the Reporting tab at the top, then in the reports sidebar select Audience > Custom > Custom Variables, and select Custom Variables (Key 2) as the Primary Dimensions.
Finding a user's ID number
Due to Google Analytics' Terms of Service, we are unable to provide the user names or emails. You must manually look up the ID for a Displayr user by following these steps:
- Log in to Displayr.
- Click Your Company Name (settings) at the top of any Displayr page.
- In the Users list, click on the name of any user.
- Observe that the address bar in your web browser looks like this:
https://app.displayr.com/User?user_id=1&company_id=2
This means you are viewing the details for user ID number 1.
If you would like to do the opposite and look up the user details for a particular ID you see in Google Analytics reports, in the address bar change the number after user_id= to the user ID you have and press Enter.