mfts / papermark

Papermark is the open-source DocSend alternative with built-in analytics and custom domains.
https://papermark.io
GNU Affero General Public License v3.0
5.5k stars 742 forks source link

Improve Time Tracking to Account for Inactivity #564

Open luksch42 opened 2 months ago

luksch42 commented 2 months ago

Currently, the time metric in Papermark seems to track the time a document is open, regardless of whether the user is actively viewing it. Recently, one of our recipients left the document open overnight, resulting in an inflated time-on-page of over 1900 minutes. This severely distorted our graphs and statistics, making them unreliable.

Bildschirmfoto 2024-08-15 um 11 09 07

Proposed Solution: Implement a more accurate time tracking mechanism that accounts for user inactivity. Possible approaches include:

Maybe a mix?

Impact: This change will lead to more accurate and reliable statistics, preventing extreme cases like this from skewing the data and ensuring that the time-on-page metrics better reflect actual user engagement.

mfts commented 2 months ago

Thanks @luksch42 for the proposal!

This is indeed a great suggestion.

Inactivity Timeout: Pause the time tracking after a certain period of no user interaction (e.g., 2 or 5 minutes without mouse movement, clicks, or scrolling).

I like that. Specifically mouse/keyboard activity to determine inactivity.

Tab Activity Detection: Stop tracking time when the document’s tab is not in focus or the browser window is minimized.

We are already doing this, however this is not perfect either.

If you want to open a PR to improve this, it would be awesome. Otherwise, we probably can get to it next week.

P.s.: You can email me in support@ with your documentId and accountId and I remove the overstated analytics for you.

oss-gg[bot] commented 3 weeks ago

This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest