A fully incremental model that transforms media player event data into derived tables for easier querying generated by the Snowplow JavaScript tracker in combination with media tracking specific plugins such as the Media Tracking plugin or the YouTube Tracking plugin. The package also supports media events generated by the Snowplow iOS and Android trackers.
Please refer to the doc site for a full breakdown of the package.
The easiest way to get started is to follow our QuickStart guide.
The latest version of the snowplow-media-player package supports BigQuery, Databricks, Redshift, Snowflake & Postgres. For previous versions see our package docs.
- A dataset of media-player events must be available in the database. You can collect media events using our plugins for the JavaScript tracker or using the iOS and Android trackers: Media plugin, HTML5 media player plugin, YouTube plugin, Vimeo plugin or the iOS and Android media APIs
- Have the
webPage
context enabled on Web or the screen context on mobile (default). - Enabled session tracking on the tracker (default).
The model is compatible with all versions of our media tracking APIs. These have evolved over time and may track the media events using two sets of event and contexts schemas:
-
Version 1 media schemas:
- media-player event schema used for all media events.
- media-player context v1 schema.
- Depending on the plugin / intention there are player-specific contexts:
- in case of embedded YouTube tracking: Have the YouTube specific context schema enabled.
- in case of HTML5 audio or video tracking: Have the HTML5 media element context schema enabled.
- in case of HTML5 video tracking: Have the HTML5 video element context schema enabled.
-
Version 2 media schemas (preferred):
- per-event media event schemas.
- media-player context v2 schema.
- optional media-session context schema.
- optional media-ad and ad break context schema.
Check dbt Hub for the latest installation instructions.
Please refer to the doc site for details on how to configure and run the package.
The package contains multiple staging models however the mart models are as follows:
Model | Description |
---|---|
snowplow_media_player_base | A table summarizing media player events by media and pageview including impressions. |
snowplow_media_player_plays_by_pageview | A view summarizing media plays by media on a pageview level. |
snowplow_media_player_media_stats | An aggregated table of media metrics on a media_identifier level. |
snowplow_media_player_media_ad_views | A view summarizing each ad viewed within a media playback (only for v2 schemas, see above). |
snowplow_media_player_media_ads | An aggregated table of ad metrics for each ad played within each media content (only for v2 schemas, see above). |
Please refer to the dbt doc site for details on the model output tables.
We welcome all ideas, questions and contributions!
For support requests, please use our community support Discourse forum.
If you find a bug, please report an issue on GitHub.
The snowplow-media-player package is Copyright 2022-2024 Snowplow Analytics Ltd.
Licensed under the Snowplow Personal and Academic License (the "License"); you may not use this software except in compliance with the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.