Just wanted to ask if it's possible to track session length on a Progressive Web Application? Any advice or ideas on how I can track the user's session length?
I'm using Mixpanel library for our analytics/statistics.
I can track the session length only if the user clicks on the logout button, however there are cases wherein the user will just close the app/browser directly causing an issue where I cannot determine when did the user ended their app usage, so it's crucial for me to send a track event to the API that the user closed the app/browser.
Is it possible with the current state of progressive web apps to detect if the app or browser was closed? or not?