How do I receive events from the browser in my node.js code? (e.g: I imagine Mixpanel, kissmetrics, etc do something like this?
thanks
The same way any other web server receives events from the browser: the browser makes an HTTP request to the URL of your server and the server receives that request. Listening for HTTP requests is the "Hello World" example for node.js.
What you're looking for is http://hummingbirdstats.com/ realtime stats 20 times a second.
You should also checkout socket.io if you haven't. Websockets events are faster than HTTP requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With