0

Shiny is our internal BI system. And we are using Shiny Server to run Shiny pages. I wanted to be able to track user activities on those pages. I couldn't find many articles related to that but I noticed from Sever User Guide that it is possible to have Google Analytics tacking those activities. However, we make our Shiny pages only available when people are in our internal network. I guess the Google Analytics code may not work. Anyone has similar experience? On the other hand, is there any other ways we could track those activities? Specifically I am interested in number of visits, avg session time, and geo info of those visits. Thank you!

Added: eventually we would like to have a Shiny page (or others) as a report to track our daily usage. So if we could find a way to store our site activities without impact performance, it would be great.

Z. Zhang
  • 501
  • 8
  • 20
  • Add Google Tag Manager on the page like described here: http://shiny.rstudio.com/articles/google-analytics.html – Artem Klevtsov Dec 18 '15 at 17:16
  • You can easily track number of visits and average session time directly in your server.R, look here : http://stackoverflow.com/questions/33235473/shiny-server-how-to-use-sessiononsessionended/33236190#33236190 – Victorp Dec 18 '15 at 17:30
  • Instead of Google Analytics You could use Open Web Analytics. It is open source and there are additional options like "Click Heatmaps" or even "Mouse Movement". http://www.openwebanalytics.com/?page_id=158 – Michal Majka Dec 18 '15 at 17:33
  • @Victorp your suggestion seems work. But the code in your post stores a file per user per visit. I guess if we have many users then we would have too many files. It would be hard to analyze. Do you have any suggestions of how to have all visits data in the same file? – Z. Zhang Dec 18 '15 at 18:42
  • No it creates one file per app (change the path in my example), after the tracking data are appended in that file. – Victorp Dec 18 '15 at 18:51

1 Answers1

0

Thanks for @Victorp . His comments above are what I am looking for.

Z. Zhang
  • 501
  • 8
  • 20