Monitor video data
Learn how to enable playback analytics in the FastPix Android Player using the FastPix Data Core SDK.
The FastPix Android Data Core SDK captures playback analytics automatically, including playback lifecycle events (play, pause, ready, complete, errors), buffering behavior, seek patterns, and engagement signals. The SDK sends collected data to your FastPix workspace for near real-time monitoring through the dashboard.
The integration is lightweight and doesn’t interrupt or degrade playback. If analytics setup fails at runtime, playback continues. Analytics is fail-safe by design.
When to use analytics
Use analytics when you want to:
- Measure viewer engagement and completion trends.
- Detect buffering and quality-of-experience issues.
- Correlate playback behavior with video metadata (for example, title and ID).
- Monitor player health and failures in production.
Configure analytics
Set up analytics using AnalyticsConfig and pass it to FastPixPlayer.Builder:
Required and optional parameters
workSpaceIdis mandatory.playerViewis optional. Use the two-argument constructorAnalyticsConfig.Builder(playerView, workSpaceId)when a single view shows the player. Use the single-argument constructorAnalyticsConfig.Builder(workSpaceId)(no view) when the player is shown in different views over time, as with aFastPixPlayerPool, where each page’s view is measured through thePlayerViewshowing it.videoDataDetails,playerDataDetails, andcustomDataDetailsare optional and can be added based on your use case.
Note: Since 2.2.0, a view begins when the first video starts, not when the player is built. A player that never plays anything reports nothing.
One view per video watched
Analytics reports one view for each video the user actually watches:
- A view begins when a video starts playing. That happens when you set it with
setMediaItemorsetFastPixMediaItem, when it is reached in a playlist (throughsetPlaylist,next(),previous(),skipTo(), or auto-advance), or when it is made current in aFastPixPlayerPoolthroughsetCurrentIndex. - A view ends when playback moves to another video, the playlist is cleared, or the player is released.
- Entries that are only preloaded or pre-rendered are never reported.
The FastPix Data SDK reports one view at a time per app. Beginning a view on one player ends any view still open on another.
Add per-entry metadata
Give each playlist entry its own metadata with PlaylistItem.withVideoData(...). When an entry has no metadata of its own, setVideoDataDetails on the config is the fallback, and failing that the entry id is reported:
For more on building and editing playlists, see Manage playlists.
Analytics in a feed (FastPixPlayerPool)
A pool’s players move between pages, so build the config without a view. Each page’s view is measured through the PlayerView showing it. Pass the config to the pool:
Each page the user lands on is one view, and swiping away ends it. Pages pre-rendered off screen are not views, so pre-rendering does not inflate view counts.
For the full feed setup, see Build video feeds.
Notes
- If analytics setup fails at runtime, playback continues. Analytics is fail-safe by design.
- Current analytics APIs are optimized for Java-first Android integration.
Frequently asked questions
How do I add analytics to the FastPix Android player?
Build an AnalyticsConfig with your workSpaceId (and optionally the PlayerView), then pass it to FastPixPlayer.Builder(...).setAnalyticsConfig(...). Analytics starts automatically and does not interrupt playback.
What counts as a view?
A view begins when a video starts playing, whether through setFastPixMediaItem, playlist navigation, or setCurrentIndex in a pool. Preloaded and pre-rendered entries are never counted, so a view maps to one video the user actually watched.
Is playerView required in AnalyticsConfig?
No. Only workSpaceId is mandatory. Pass a PlayerView for a single view, or omit it and use AnalyticsConfig.Builder(workSpaceId) when players move between views, as in a FastPixPlayerPool.
Does analytics affect playback if it fails?
No. Analytics is fail-safe by design. If setup fails at runtime, playback continues without interruption.
What’s next
- Play a playlist to give each entry its own metadata for analytics.
- Build video feeds to measure one view per video the user lands on.
- Preload and cache for faster startup to speed up playback without inflating view counts.