We are excited to announce the release of the Snowplow Android and iOS trackers, version 5.3.0.
This release brings the new media tracking APIs and improvements in remote configuration!
The media tracking APIs enable tracking of media events from video or audio playback. They provide the following key features:
- Integrate with any media player: Instead of integrating with a specific media player, the tracker provides universal media tracking APIs that can be utilized to track media events regardless of the media player being used to play the content.
- Media session tracking: A new media session context entity is added to tracked events that identifies the media playback. The entity also adds statistics calculated using edge analytics on the tracker such as the time spent playing, buffering or the number of ads played.
- Support for tracking live video: Using media ping events, the tracker supports periodically tracking the progress within a live streamed video. The media ping events are fired periodically when the media is being played with configurable frequency and settings.
- Tracking ads during playback: The tracker provides out-of-the-box events and entities for tracking ads within linear, non-linear and companion ad breaks during playback.
- New media event schemas: The tracked events follow new schemas with additional properties. New events and entities for data quality and error tracking have been added.
- Customizable: The tracker supports tracking custom media events and custom entities to meet your specific requirements.
- AVPlayer auto-tracking on iOS: The tracker provides APIs to auto-track media events from the AVPlayer media player.
Here is an example of how to track media events on iOS:
let id = "XXXXX" let tracker = Snowplow.defaultTracker() // Initialize the media tracking identified by the `id`. It will start tracking media ping events. let mediaTracking = tracker.media.startMediaTracking(id: id) // Track a media play event within the media tracking. mediaTracking.track(MediaPlayEvent()) // Update the current playback position without tracking any events. mediaTracking.update(player: MediaPlayerEntity().currentTime(10.0)) // Track the start of an ad. let ad = MediaAdEntity(adId: "1234").name("Podcast Ad").duration(15) mediaTracking.track(MediaAdStartEvent(), ad: ad) // End and clear the state for the media tracking. tracker.media.endMediaTracking(id: id)
The release also brings improvements in the remote configuration. It adds support for configuring emitter configuration through remote configuration. It also respects default configuration for properties that are not configured through remote configuration.
- Add media controller with APIs to track media events (#765 for iOS and #606 for Android)
- Add emitter configuration support to remote configuration (#782 for iOS and #607 for Android)
- Use default configuration for properties that are not configured using remote configuration (#785 for iOS and #613 for Android)
- Add custom HTTP headers configuration (#276 for Android)
- Truncate URL scheme for page_url and page_refr properties (#793 for iOS and #616 for Android)
- Truncate language in platform context entity to max 8 characters (#795 for iOS and #621 for Android)
- Fix emit range configuration in Emitter not respected if using SQLite event store (#789 for iOS)
- Remember requestCallback, customRetryForStatusCodes and onSessionUpdate set for initialized trackers after configuration updates (Android)