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
| iOS | Android | |
|---|---|---|
| System | Event streaming to Inkrypt backend | Periodic push to a configurable endpoint |
| Activation | Automatic - always on | Server-side per-video, configured in the Dashboard |
| Configuration | None | Dashboard: URL, interval, enabled flag |
| Flutter API | None exposed | None 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:
| Event | When It Fires |
|---|---|
setup | Player begins initializing |
startup | First frame rendered |
playing | Video actively playing (sent periodically) |
play | Playback resumes after pause or seek |
pause | Playback paused |
seeking | User initiates a seek |
bufferingStart | Playback stalls waiting for data |
bufferingEnd | Buffering completes, playback resumes |
qualityChange | Active quality level changes |
ended | Video plays to completion |
close | Player reset or destroyed |
iOS Identifiers
The iOS SDK exposes two static identifiers for correlating analytics with your own data:
| iOS API | Description | Flutter Status |
|---|---|---|
InkPlayer.userId | Device-specific UUID, persisted across launches | Not exposed in Flutter |
InkPlayer.sdkVersion | Current SDK version string | Not 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:
- A repeating timer starts at the configured interval
- On each tick, a
POSTis sent to the configured URL with the current playback state - Pushes stop automatically if the server responds with an error
>= 400
Android Payload
Each push includes:
| Field | Type | Description |
|---|---|---|
userId | String | Identifier derived from the video's watermark label (Base64 encoded) |
videoId | String | The video being played |
otp | String | OTP used to authenticate the current session |
totalPlayedTimeInSeconds | Long | Active play time this session (paused time excluded) |
currentPositionInSeconds | Long | Current playhead position at the time of the push |
Dashboard Configuration
The following settings are configured per-video in the Inkrypt Dashboard:
| Setting | Description |
|---|---|
app_push_live_analytics_enabled | Enables or disables the feature for a specific video |
app_push_live_analytics_url | The POST endpoint that receives the payload |
app_push_live_analytics_interval | Push frequency in milliseconds |
Server Response Handling
| HTTP Response | Behavior |
|---|---|
2xx | Accepted — timer continues |
403 | Session forcibly ended — player resets and shows an error |
Other 4xx / 5xx | Analytics 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.