Event Reporting Protocol - Analytics
Event Reporting Protocol
Session Management
Each playback session requires a unique analytics session ID. The analytics session is separate from the Kaltura Session (KS):
- KS — Authentication token for API calls
- Analytics session — Unique identifier linking all events from one playback session
Generate a unique analytics session ID per player instance / playback session. Use a UUID or timestamp-based identifier.
Event Ordering
Fire events in the correct lifecycle order:
WIDGET_LOADED(player ready)MEDIA_LOADED(media metadata available)PLAY(playback begins)PLAY_REACHED_25→PLAY_REACHED_50→PLAY_REACHED_75→PLAY_REACHED_100(as playback progresses)PAUSE,SEEK,BUFFER_START/BUFFER_END(during playback as they occur)REPLAY(if user replays)
Quartile Calculation
Calculate quartile events based on the actual content duration:
- Fire each quartile event only once per playback session
- Base quartile positions on total content duration (excluding ads)
- If the user seeks past a quartile position, do not retroactively fire the skipped quartile — fire it only during natural forward playback
Batching and Timing
- Fire events as they occur rather than batching — real-time analytics depend on timely delivery
- Include accurate
eventTimestampvalues (Unix seconds) - If the client goes offline temporarily, queue events and send them in order when connectivity resumes