DEV Community

Discussion on: How to get time spent by users on a webpage using Node.js?

Collapse
 
inigochoa profile image
Iñigo Ochoa

Nice one!!

Consider using visibilitychange instead of beforeunload. Seems to work better on mobile phones.

developer.mozilla.org/en-US/docs/W...

Some comments have been hidden by the post's author - find out more