Presence Tracker — Test Hub
Drop-in widget that times active presence on a page until the
learner clicks .complete_btn, then stores the session in IndexedDB.
How to test the full flow
- Open Lesson 1. Watch the live timer (top-right) climb.
- Switch to another browser tab for a few seconds — the timer pauses.
Switch back — it resumes. (Active-time only.)
- Click Mark as Complete in the footer. Timer stops, a
toast confirms the saved minutes.
- Repeat on Lesson 2 (different id + email).
- Open the Data Viewer to see one row per completion with
page URL, lesson id, email, and active minutes.
- Complete a lesson again → a new row appends (full history kept).