Data Flow strives to provide you with the highest quality information as quickly as possible on each event collected. However, some information (such as the time spent between two events for example) can only be calculated once the second event has been received. For technical reasons, the information concerning the difference between two events can only be calculated and attributed back to the second event.
This is problematic for the following reason, let us take two events:
- av.start at 12:00:00
- av.pause at 12:01:00
The av_duration property will be equal to 00:01:00 and when shared in real time by Data Flow would be attributed to the second event. In reality, the event that lasted one minute was the first, av.start event.
For this reason, this technical nuance in the data can lead to misunderstandings and consequently to incorrect calculations. As we always aim to provide you with the highest quality information, we have chosen not to include the following metrics from Data Flow while providing you with the precise calculation rules to recreate them on your end once the data is received:
Here are the precise rules to calculate these properties between events if you wish to recreate them on your end:
- av_duration : difference between event_time AND next_event_time
- av_cursor_difference : difference between av_position AND next_av_position
- av_playback_duration : difference between event_time AND next_event_time WHEN:
event_name = ('av.heartbeat','av.start','av.resume') OR
(event_name = ('av.forward','av.backward') AND (next_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 next_event_time WHEN event_name = ('av.buffer.heartbeat','av.buffer.start')
- av_rebuffer_duration : difference between current event_time AND next_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.