Tracking user interaction
-
Hello,
I have a dashboard display which runs unattended on Mango and I would like to track how often people are clicking on it and interacting with it.
So far I have considered detecting mouse movement using JS, something like: https://stackoverflow.com/questions/13206042/detecting-mouse-movement-without-jquery
And then updating a point in the JSON store when this interaction is detected.
Using a Meta Data Source I could potentially record the change in the JSON point. Once the data point is set up I can then generate graphs, determine statistics and so on.What do you think of this approach? There are no API publishers for this that I know of, but I think it could be a really valuable feature of Mango.
-
@henryblu said in Tracking user interaction:
And then updating a point in the JSON store when this interaction is detected.
Using a Meta Data Source I could potentially record the change in the JSON point.I would say the easiest way to do what you want is set an interval timer in the dashboard for say one minute. If you detect any mouse movement in that one minute, set a binary point (just create a virtual data point, no change) value to 1. If no movement was detected set it to 0.
-
Also you can plug Google Analytics into the dashboards via
UI Settings
-
The other thought I had was you could setup an HTTP Receiver data source and make a GET request to set a point value. This approach would keep from having to allow SET permission on the Virtual data point Jared suggested.
-
Hi guys,
Thanks very much for the advice. Upon @Jared-Wiltshire's recommendation I pasted my
Google Analytics Property ID into the UI settings page. It's then as simple as creating an onclick event: https://developers.google.com/analytics/devguides/collection/analyticsjs/events<div flex layout="column" onclick="ga('send', 'event', 'buttons', 'click','B005');"></div>
From here I was able to view real-time and historic page interactions based on clicking. I could also create events for mouse moving, but it generates a lot of events as you would expect and in google analytics you are limited to 500 hits per session or 10 million events per month.
<div flex layout="column" onmousemove="ga('send', 'event', 'mouse', 'move','B005');"></div>
Really happy though - exactly what I was after.