Snowplow JavaScript Trackers v3.12.0 released

We are excited to announce version 3.12.0 of the Snowplow JavaScript Trackers.

This release introduces the new Media plugin!

The plugin enables tracking of media events from video or audio playback. Compared to our existing media tracking plugins (for HTML5 and YouTube), the new plugin builds on top of new event and entity schemas and provides new tracking APIs that are aimed to be more universal and cover more use cases.

Key Features:

  1. Integrate with any media player: Instead of integrating with a specific media player, the plugin provides universal media tracking APIs that can be utilized to track media events regardless of the media player being used to play the content.
  2. Media session tracking: The plugin adds a new media session context entity 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.
  3. Support for tracking live video: With the addition of media ping events, the plugin now 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. Moreover, the plugin also makes sure that page ping events are being tracked during playback even if the user is not interacting with the page.
  4. Tracking ads during playback: The plugin provides out-of-the-box events and entities for tracking ads within linear, non-linear and companion ad breaks during playback.
  5. 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.
  6. Customizable: The plugin supports tracking custom media events and custom entities to meet your specific requirements.

Simplified example usage of the media tracking APIs:

newTracker("ns1", "https://...", { plugins: [SnowplowMediaPlugin()] });
const id = "media-tracking-id";

// Initialize the media tracking identified by the `id`. It will start tracking media ping events.
startMediaTracking({ id, player: { duration: 100 } });
// Track a media play event within the media tracking.
trackMediaPlay({ id });
// Update the current playback position without tracking any events.
updateMediaTracking({ id, player: { currentTime: 50 } });
// Track the start of an ad.
trackMediaAdStart({ id, ad: { adId: "ad-id", name: "Ad 1" duration: 4 } });
// End and clear the state for the media tracking.
endMediaTracking({ id });

To learn more about the plugin, see the documentation for the browser tracker, or the JavaScript tag tracker, or see the media events tracked live in this demo app.

Changelog

  • Add Snowplow Media plugin with APIs to track media events (#1176)

Upgrading

Version 3.12.0 is available as @snowplow/browser-tracker on npm, or as the tag based javascript tracker - available on GitHub Releases , jsDelivr or unpkg.

3 Likes