How is time spent on page and AV Insights contents calculated?
Time spent is always measured by comparing the timestamp of two collected events.
For pages, the time spent is calculated between two page events or between the page event and the last event generated from this same page.
For AV Insights content, the time spent metrics are based on different properties that use either the event timestamp or the cursor position measured to calculate the time elapsed between two AV actions or events, depending on what is analyzed (playback time, session time, buffering time, etc.).
Here is the list of all properties that can take part in AV Insights time spent calculations:
av_duration: difference between event_time AND event_time
av_cursor_difference: difference between av_position AND av_position
av_playback_duration: difference between event_time AND event_time WHEN:
event_name = ('av.heartbeat','av.start','av.resume') OR
(event_name = ('av.forward','av.backward') AND (event_name = ('av.heartbeat','av.pause','av.buffer.start','av.rebuffer.start'))) OR
(event_name = ('rm.refresh','rm.play','rm.info'))av_buffer_duration: difference between event_time AND event_time WHEN event_name = ('av.buffer.heartbeat','av.buffer.start')
av_rebuffer_duration: difference between current event_time AND event_time WHEN event_name = ('av.rebuffer.heartbeat','av.rebuffer.start')
Caution: these calculations must be done by segmenting on visit_id, av_session_id, av_content_id.
Those properties allow calculating the following metrics:
AV - Time spent: AV - Cumulative Time Spent (sum of av_duration) divided by AV - Sessions (count distinct of av_session_id).
AV - Playback time: AV - Cumulative Playback Time (sum of av_playback_duration divided by AV - Playbacks (count distinct of av_session_id where av_content_time_consumed is greater than 0 ; av_content_time_consumed is the sum of av_cursor_difference)
AV - Time spent buffering: AV - Cumulative time spent buffering (sum of av_buffer_duration) divided by AV - Sessions
AV - Time spent rebuffering: AV - Cumulative time spent rebuffering (sum of av_rebuffer_duration) divided by AV - Sessions