Live Analytics

The Inkrypt Video Player SDK automatically collects playback analytics on both platforms. No Flutter code is required to activate it. However, the two platforms use different analytics systems, what is tracked, where it goes, and how it is configured differ between iOS and Android.


Overview

iOSAndroid
SystemEvent streaming to Inkrypt backendPeriodic push to a configurable endpoint
ActivationAutomatic - always onServer-side per-video, configured in the Dashboard
ConfigurationNoneDashboard: URL, interval, enabled flag
Flutter APINone exposedNone exposed

All analytics happen entirely in the native layer. No Dart-side setup is needed.


iOS Analytics

On iOS, the SDK automatically tracks playback events and streams them in near real-time to the Inkrypt analytics backend (analytics.inkrypt.org). This runs automatically for every video — there is nothing to configure.

For the full details, event types, per-event payload fields, session/user identifiers, and the analytics dashboard, see the iOS Live Analytics Guide.

What Is Tracked

The iOS SDK tracks 11 event types across the video lifecycle:

EventWhen It Fires
setupPlayer begins initializing
startupFirst frame rendered
playingVideo actively playing (sent periodically)
playPlayback resumes after pause or seek
pausePlayback paused
seekingUser initiates a seek
bufferingStartPlayback stalls waiting for data
bufferingEndBuffering completes, playback resumes
qualityChangeActive quality level changes
endedVideo plays to completion
closePlayer reset or destroyed

iOS Identifiers

The iOS SDK exposes two static identifiers for correlating analytics with your own data:

iOS APIDescriptionFlutter Status
InkPlayer.userIdDevice-specific UUID, persisted across launchesNot exposed in Flutter
InkPlayer.sdkVersionCurrent SDK version stringNot exposed in Flutter

The per-session sessionId is tracked internally and appears in the Inkrypt Dashboard but is not part of the public API on either platform.


Android Analytics

On Android, the SDK uses App Push Live Analytics: a periodic push mechanism that sends playback state to an endpoint you configure in the Inkrypt Dashboard. This feature is controlled entirely server-side, per-video.

For the full details, payload fields, server response handling, dashboard configuration, and lifecycle behavior, see the Android Live Analytics Guide.

How It Works

When a video loads, the SDK checks the video metadata for a live analytics configuration. If enabled for that video:

  1. A repeating timer starts at the configured interval
  2. On each tick, a POST is sent to the configured URL with the current playback state
  3. Pushes stop automatically if the server responds with an error >= 400

Android Payload

Each push includes:

FieldTypeDescription
userIdStringIdentifier derived from the video's watermark label (Base64 encoded)
videoIdStringThe video being played
otpStringOTP used to authenticate the current session
totalPlayedTimeInSecondsLongActive play time this session (paused time excluded)
currentPositionInSecondsLongCurrent playhead position at the time of the push

Dashboard Configuration

The following settings are configured per-video in the Inkrypt Dashboard:

SettingDescription
app_push_live_analytics_enabledEnables or disables the feature for a specific video
app_push_live_analytics_urlThe POST endpoint that receives the payload
app_push_live_analytics_intervalPush frequency in milliseconds

Server Response Handling

HTTP ResponseBehavior
2xxAccepted — timer continues
403Session forcibly ended — player resets and shows an error
Other 4xx / 5xxAnalytics pushes stop for the remainder of the session

Viewing Analytics

All tracked data is aggregated and available in the InkryptVideos Dashboard, where you can view per-video metrics including play count, total watch time, completion rate, quality distribution, buffering events, and per-session event timelines.