Time Spent Tracking
Snowplow Measurement of Engaged Time Spent
Page Pings Methodology
Snowplow sends a regular event, called a page ping, while the user is actively engaging with the content (e.g. is the tab in focus, mouse movement, scrolling, calling updatePageActivity, etc.). Each page ping is recorded as an event on Snowplow. When the browser stops sending the page ping events, it indicates that the user has stopped engaging with content within the regular interval set (known as heartbeat delays), and no page ping fires (e.g. user is on a different tab).
Parameters
Page pings are enabled on the backend through two parameters: the minimum visit length and the heartbeat delay. The minimum visit length is the time period from page load before the first page ping occurs, in seconds. Heartbeat delay is the number of seconds between each page ping, once they have started. Currently the parameters are set up as:
Minimum visit length: 5s
Heartbeat delay: 10s
Meaning that the first ping would occur after 5 seconds, and subsequent pings every 10 seconds as long as the user continues to browse the page actively.
About Parsely
Parse.ly continuously checks to see if a visitor is engaging with the page, then in 150s (or leaving the page; whichever comes first) a heartbeat is sent with the total engaged time gathered in that time frame. The process continues every 150s, where a user is engaged.
After 5 seconds of inactivity, the user is considered not engaged, and thus their Engaged Time value on the page will not increment (i.e. the minimum amount of ET between events is 5s). This helps keep a more accurate idea of Engagement with the page as the Visitor's ET on the page will not include time when they were in a different tab or left their computer running to walk their dog.
Audio Time Spent
Audio Ping
The audio_ping event should should be fired by the player when the audio has played for the configured interval (initial 5 seconds, afterwards 10 seconds), i.e 5 seconds after each play event. It is modelled similarly to the Page Ping (default) Snowplow event.
It indicates that the player is actually playing and/or the user is engaging with the audio.
Modelling of Audio Time Spent
The first audio_ping is fired 5 seconds after each play event (when the user hits play) and afterwards every 10 seconds while the player is playing. The order of "events" will be: play, 5, 10, 20, 30, 40 seconds etc. When a user hits pause and play again the audio ping sequence starts over and will be as follows: 5, 10, 20, pause, 5, 10, 20, 30, 40 seconds etc.
Video Time Spent
Video Ping
Video ping events are events sent in a regular interval while video tracking is active. They inform about the current state of the video playback. The video engaged time is calculated based on the video pings received when the user is watching the video. Additional criteria used to determine the user’s engagement with the video has been incorporated.
Modelling of Audio Time Spent
Video pings are designed to work similar to snowplow default activity tracking: page pings. The first video_ping will be sent at 5 seconds, all subsequent video_pings at 10 seconds to match page_ping.
For additional information, do check out the Alation Article on Time Spent.