The connected callbacks to report payloads to.
The current state the user is in.
The timer ID for the current idle timer (used to clear the timer when the user goes active).
Flag indicating if the event listeners have been initialized or not.
A configurable logger.
The summed times the user has been in each state (categorized).
Flag indicating if monitoring is currently on or off.
An array of the videos that have had their events registered already. Currently, only Vimeo
videos are registered, and the iframe src
must start with https://player.vimeo.com
.
The ID for the currently active report timer.
A stopwatch-like timer.
How long (ms) the user must be inactive before being considered idle. Defaults to 2 minutes.
How long (ms) the user can be idle before being considered off-page. Defaults to 15 minutes.
How long (ms) the user must be off-page while before being considered away for a long time. Defaults to 15 minutes.
The length of time (ms) between reports. Defaults to 10 seconds.
Should the full trace be reported along with the summary metrics?
Defaults to false
.
Get the summary metrics for the user's activity.
All report metrics except the full trace.
The current state the user is in, see {@link _states _states
}.
Mark the user as active / engaged and record the current time.
Mark the user off page and record the current time.
Monitor the user's activity, triggering an active state when they engage with the page and various types of idle states depending on their inactivity. See the Report type for the different metrics being monitored.
Record the current timer time to the appropriate key in the given record.
The report object to record the time to.
Find and register videos, and hook into their events.
Report the user's activity statistics for the session.
The event that triggered the report, if any.
Signal with the report payload to the connected callbacks.
Log the user's activity in the full trace.
The state the user is moving to.
Log the current time, then prevent any additional monitoring or reporting.
Generated using TypeDoc
Track (gauge) a user's engagement with a web page.