Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How to implement realtime tracking in a webapp
1 point by hueking on Feb 18, 2015 | hide | past | favorite | 3 comments
I recently started to help out a startup which already had some software in place.

The front-end is written in Angular.

We wish to track activity of the users, especially how much people are currently active on a page(actually thats a route).

Currently we have a polling mechanism in place to update the data on the front-end. So I attached additional logic which creates a REDIS key with with the IP and a cookie, to track each client. Keys are structured in a similar manner:

viewing:resource:ip:cookie

And there is a TTL on each key. Consecutive call refresh that key. Now I only count the viewing:resource:* keys and I have a number of people on this resource.

But the solution is done in an urge of drunken 'brilliance'. How do the big players track concurrent online visitors on webaps?



Can't you use google analytics for this?


We additionally want to have the data exposed to partners, so we need an access through an API. As far I'm aware on the pricy enterprice edition of GA provides an HTTP API.


MixPanel?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: