Interesting. From your headline here I was hoping that you used the standard Google snippet with an override of the tracking host. I think it would be more powerful to save whatever the same GA setup would save.
Opening a new WebSocket for each client sounds like a lot of stress on the server, do you need the persistent connection? What if the client visits a new page? A new connection is created?
3 comments
[ 2.9 ms ] story [ 14.8 ms ] thread1. To get the total online active users.
2. Is to log the total active time on the webpage when user leave’s.
Any other way that you suggest?