0

I'd like to display the number of concurrent users on my site. Is there a JS API to load that information somehow?

(I use Mixpanel, Clicky, Google Analytics, etc... someone must know that info!)

Edit: This is different because I'm looking for a JS solution that won't hit my DB. Although if necessary, I would do it with Ruby on Rails..

Geoff
  • 9,470
  • 13
  • 52
  • 67
  • 2
    http://stackoverflow.com/questions/11937228/is-there-a-way-to-return-the-number-of-devise-users-currently-logged-in – Robert Harvey Feb 19 '13 at 20:43
  • 1
    http://stackoverflow.com/questions/5504130/whos-online-using-devise-in-rails – Robert Harvey Feb 19 '13 at 20:43
  • 1
    http://stackoverflow.com/questions/5254857/display-realtime-list-of-logged-in-users-maybe-using-authlogic – Robert Harvey Feb 19 '13 at 20:43
  • 1
    http://stackoverflow.com/questions/5254857/display-realtime-list-of-logged-in-users-maybe-using-authlogic – Robert Harvey Feb 19 '13 at 20:43
  • 1
    http://railsforum.com/viewtopic.php?id=18480 – Robert Harvey Feb 19 '13 at 20:44
  • Thanks, it's just that all those database-level solutions are going to slow down the site. I'm ideally looking for a Google Analytics/Mixpanel/etc. solution, with just a JS API, but if I have to I'm guess I'd have to implement a database-level solution. I'd rather not query the database continually just for this info. – Geoff Feb 19 '13 at 23:17
  • It's a solution involving sets: the set of all people who had activity on the site in the last six minutes (or something similar). A database is probably your *fastest* solution, not your slowest. If you're worried about traffic, reduce the polling time. – Robert Harvey Feb 19 '13 at 23:19

0 Answers0