Skip to main content

Media playback events

Snowplow provides a complete solution for tracking events from media (video or audio) playback and for modeling the tracked data.

This page gives an overview of the tracked data (consisting of self-describing events and context entities) and points to resources for setting up tracking using our Web and mobile trackers and modeling using our dbt package.

Older (version 1) media event and context entity schemas

This page describes events and entities in the newer, version 2, schemas for media events and context entities. In case you are using the HTML5 and YouTube plugins for the JavaScript tracker, you may still be using the older schemas. These are still supported and work with our dbt media package. However, they provide less information (e.g, no ad tracking) and less accurate playback metrics (which are estimated based on percentage progress boundaries).

They consist of the following events and context entities:

Eventsโ€‹

Playback eventsโ€‹

Buffer end eventโ€‹

Event: buffer_end_event

Media player event fired when the the player finishes buffering content and resumes playback.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/buffer_end_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_buffer_end_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'buffer_end_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Buffer start eventโ€‹

Event: buffer_start_event

Media player event fired when the player goes into the buffering state and begins to buffer content.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/buffer_start_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_buffer_start_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'buffer_start_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Pause eventโ€‹

Event: pause_event

Media player event sent when the user pauses the playback.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/pause_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_pause_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'pause_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Playback end eventโ€‹

Event: end_event

Media player event sent when playback stops when end of the media is reached or because no further data is available.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/end_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_end_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'end_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Percent progress eventโ€‹

Event: percent_progress_event

Media player event fired when a percentage boundary set in tracking options is reached

Schema URI:iglu:com.snowplowanalytics.snowplow.media/percent_progress_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress["integer","null"]The percent of the way through the mediaโŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_percent_progress_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'percent_progress_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Media ping eventโ€‹

Event: ping_event

Media player event fired periodically during main content playback, regardless of other API events that have been sent.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ping_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ping_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ping_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Play eventโ€‹

Event: play_event

Media player event sent when the player changes state to playing from previously being paused.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/play_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_play_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'play_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Seek end eventโ€‹

Event: seek_end_event

Media player event sent when a seek operation completes.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/seek_end_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_seek_end_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'seek_end_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Seek start eventโ€‹

Event: seek_start_event

Media player event sent when a seek operation begins.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/seek_start_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_seek_start_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'seek_start_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Player eventsโ€‹

Error eventโ€‹

Event: error_event

Media player event tracked when the resource could not be loaded due to an error.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/error_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"errorCode": "E522",
"errorName": "forbidden",
"errorDescription": "Playback failed"
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
errorCode["string","null"]Error-identifying code for the playback issue. E.g. E522โŒ
errorName["string","null"]Name for the type of error that occurred in the playback. E.g. forbiddenโŒ
errorDescription["string","null"]Longer description for the error that occurred in the playback.โŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_error_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'error_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Fullscreen change eventโ€‹

Event: fullscreen_change_event

Media player event fired immediately after the browser switches into or out of full-screen mode.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/fullscreen_change_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"fullscreen": true
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
fullscreen"boolean"Whether the video element is fullscreen after the changeโœ…
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_fullscreen_change_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'fullscreen_change_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Picture-in-picture change eventโ€‹

Event: picture_in_picture_change_event

Media player event fired immediately after the browser switches into or out of picture-in-picture mode.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/picture_in_picture_change_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"pictureInPicture": true
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
pictureInPicture"boolean"Whether the video element is showing picture-in-picture after the change.โœ…
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_picture_in_picture_change_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'picture_in_picture_change_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Playback rate change eventโ€‹

Event: playback_rate_change_event

Media player event sent when the playback rate has changed.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/playback_rate_change_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"previousRate": 1,
"newRate": 1.5
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
previousRate["number","null"]Playback rate before the change (1 is normal)โŒ
newRate"number"Playback rate after the change (1 is normal)โœ…
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_playback_rate_change_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'playback_rate_change_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Quality change eventโ€‹

Event: quality_change_event

Media player event tracked when the video playback quality changes automatically.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/quality_change_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"previousQuality": "1080p",
"newQuality": "720p",
"bitrate": 1500,
"framesPerSecond": 30,
"automatic": true
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
previousQuality["string","null"]Quality level before the change (e.g., 1080p).โŒ
newQuality["string","null"]Quality level after the change (e.g., 1080p).โŒ
bitrate["integer","null"]The current bitrate in bits per second.โŒ
framesPerSecond["integer","null"]The current number of frames per second.โŒ
automatic["boolean","null"]Whether the change was automatic or triggered by the user.โŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_quality_change_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'quality_change_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ready eventโ€‹

Event: ready_event

Media player event fired when the media tracking is successfully attached to the player and can track events.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ready_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ready_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ready_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Volume change eventโ€‹

Event: volume_change_event

Media player event sent when the volume has changed.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/volume_change_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"previousVolume": 30,
"newVolume": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
previousVolume["integer","null"]Volume percentage before the change.โŒ
newVolume"integer"Volume percentage after the change.โœ…
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_volume_change_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'volume_change_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad eventsโ€‹

Ad click eventโ€‹

Event: ad_click_event

Media player event fired when the user clicked on the ad.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_click_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"percentProgress": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress["integer","null"]The percent of the way through the adโŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_click_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_click_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad break start eventโ€‹

Event: ad_break_start_event

Media player event that signals the start of an ad break.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_break_start_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_break_start_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_break_start_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad break end eventโ€‹

Event: ad_break_end_event

Media player event that signals the end of an ad break.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_break_end_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_break_end_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_break_end_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad complete eventโ€‹

Event: ad_complete_event

Media player event that signals the ad creative was played to the end at normal speed.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_complete_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_complete_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_complete_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad pause eventโ€‹

Event: ad_pause_event

Media player event fired when the user clicked the pause control and stopped the ad creative.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_pause_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"percentProgress": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress["integer","null"]The percent of the way through the adโŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_pause_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_pause_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad quartile eventโ€‹

Event: ad_quartile_event

Media player event fired when a quartile of ad is reached after continuous ad playback at normal speed.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_quartile_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"percentProgress": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress"integer"The percent of the way through the adโœ…
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_quartile_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_quartile_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad resume eventโ€‹

Event: ad_resume_event

Media player event fired when the user resumed playing the ad creative after it had been stopped or paused.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_resume_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"percentProgress": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress["integer","null"]The percent of the way through the adโŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_resume_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_resume_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad skip eventโ€‹

Event: ad_skip_event

Media player event fired when the user activated a skip control to skip the ad creative.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_skip_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{
"percentProgress": 50
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
percentProgress["integer","null"]The percent of the way through the adโŒ
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_skip_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_skip_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Ad start eventโ€‹

Event: ad_start_event

Media player event that signals the start of an ad.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_start_event/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…Depends on the tracker used
๐Ÿ‘€ Example
{}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
โ“ How to query the event in the warehouse?
select
unstruct_event_com_snowplowanalytics_snowplow_media_ad_start_event_1_0_0
from
PIPELINE_NAME.events events
where
events.collector_tstamp > timestamp_sub(current_timestamp(), interval 1 hour)
and events.event = 'unstruct'
and events.event_name = 'ad_start_event'
and events.event_vendor = 'com.snowplowanalytics.snowplow.media'

Context entitiesโ€‹

Media player entityโ€‹

Context entity: media_player

Schema for a context entity for media events that describes the media player and playback state

Schema URI:iglu:com.snowplowanalytics.snowplow/media_player/jsonschema/2-0-0

WebMobileTracked automatically
โœ…โœ…โœ…
๐Ÿ‘€ Example
{
"currentTime": 109,
"duration": 400,
"ended": false,
"fullscreen": false,
"livestream": false,
"label": "Big Bucks Bunny",
"loop": false,
"mediaType": "video",
"muted": false,
"paused": true,
"pictureInPicture": false,
"playbackRate": 1.5,
"playerType": "com.vimeo-vimeo",
"quality": "1080p",
"volume": 100
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
currentTime"number"The current playback time position within the media in seconds.โœ…
duration["number","null"]A floating-point value indicating the duration of the media in seconds.โŒ
ended"boolean"Whether playback of the media has ended.โœ…
fullscreen["boolean","null"]Whether the video element is fullscreen.โŒ
livestream["boolean","null"]Whether the media is a live stream.โŒ
label["string","null"]Human readable name given to tracked media content.โŒ
loop["boolean","null"]Whether the video should restart after ending.โŒ
mediaTypeOne of: video, audio, Type of media content.โŒ
muted["boolean","null"]Whether the media element is muted.โŒ
paused"boolean"Whether the media element is pausedโœ…
pictureInPicture["boolean","null"]Whether the video element is showing picture-in-picture.โŒ
playbackRate["number","null"]Playback rate (1 is normal).โŒ
playerType["string","null"]Type of the media player (e.g., com.youtube-youtube, com.vimeo-vimeo, org.whatwg-media_element).โŒ
quality["string","null"]Quality level of the playback (e.g., 1080p).โŒ
volume["integer","null"]Volume percentage at which the media will be played.โŒ

Media session entityโ€‹

The media session entity is updated automatically by our trackers. It contains metrics that are calculated based on the tracked media events and the media update calls.

It makes use of the information in the media player entity (see above) and the tracked media event types to update it's state and calculate metrics. The table below shows which media player properties (first column) and media events (second column) are used to calculate the metrics within the media session entity (third column).

Media player entity propertyMedia eventsAffected calculation of metric
pausedplay_event, pause_eventtimePlayed, timePaused, timePlayedMuted, contentWatched
currentTimetimePlayed, timePaused, timePlayedMuted, contentWatched
mutedtimePlayedMuted
playbackRateplayback_rate_change_eventavgPlaybackRate
buffer_start_event, buffer_end_event, play_eventtimeBuffering
ad_start_eventads
ad_skip_eventadsSkipped
ad_click_eventadsClicked
ad_break_start_eventadBreaks
ad_start_event, ad_quartile_event, ad_complete_eventtimeSpentAds
ad_start_event, ad_complete_event, ad_skip_eventtimePlayed, timePlayedMuted*

* Play time stats are not being incremented while ads with type linear (default) are being played. Linear ads take over the video playback. For non-linear and companion ads, play time stats are still being incremented while the ad is playing.

Context entity: session

Schema for a context entity for media player events that tracks a session of a single media player usage

Schema URI:iglu:com.snowplowanalytics.snowplow.media/session/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…โœ…
๐Ÿ‘€ Example
{
"mediaSessionId": "2d9bd9ac-abbd-419a-b934-9a2965cba339",
"startedAt": "2023-11-03T09:55:29.920Z",
"pingInterval": 15,
"timePlayed": 143.12,
"timePlayedMuted": 0,
"timePaused": 8.12,
"contentWatched": 120,
"timeBuffering": 0.988,
"timeSpentAds": 14.2,
"ads": 4,
"adsClicked": 0,
"adsSkipped": 1,
"adBreaks": 2,
"avgPlaybackRate": 1.21
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
mediaSessionId"string"An identifier for the media session that is kept while the media content is played in the media player.โœ…
startedAt["null","string"]Local date-time timestamp of when the session started.โŒ
pingInterval["integer","null"]Interval (seconds) in which the ping events will be sent. Default (specified in the tracker media docs) is assumed if not specified.โŒ
timePlayed["number","null"]Total seconds user spent playing content (excluding linear ads).โŒ
timePlayedMuted["number","null"]Total seconds user spent playing content on mute (excluding linear ads).โŒ
timePaused["number","null"]Total seconds user spent with paused content (excluding linear ads).โŒ
contentWatched["number","null"]Total seconds of the content played. Each part of the content played is counted once (i.e., counts rewinding or rewatching the same content only once). Playback rate does not affect this value.โŒ
timeBuffering["number","null"]Total seconds that playback was buffering during the session.โŒ
timeSpentAds["number","null"]Total seconds that ads played during the session.โŒ
ads["integer","null"]Number of ads played.โŒ
adsClicked["integer","null"]Number of ads that the user clicked on.โŒ
adsSkipped["integer","null"]Number of ads that the user skipped.โŒ
adBreaks["integer","null"]Number of ad breaks played.โŒ
avgPlaybackRate["number","null"]Average playback rate (1 is normal speed).โŒ

Media adโ€‹

Context entity: ad

Schema for a context entity with information about the currently played ad

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…โœ…
๐Ÿ‘€ Example
{
"name": "Snowplow 5s ad",
"adId": "2d9bd9ac-abbd-419a-b934-9a2965cba339",
"creativeId": "fb819c48-5760-4d94-9c5b-4fa52f61a998",
"podPosition": 2,
"duration": 5,
"skippable": true
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
name["null","string"]Friendly name of the ad.โŒ
adId"string"Unique identifier for the ad.โœ…
creativeId["string","null"]The ID of the ad creative.โŒ
podPosition["integer","null"]The position of the ad within the ad break, starting with 1.โŒ
duration["number","null"]Length of the video ad in seconds.โŒ
skippable["boolean","null"]Indicating whether skip controls are made available to the end user.โŒ

Media ad breakโ€‹

Context entity: ad_break

Schema for a context entity, shared with all ad events belonging to the ad break.

Schema URI:iglu:com.snowplowanalytics.snowplow.media/ad_break/jsonschema/1-0-0

WebMobileTracked automatically
โœ…โœ…โœ…
๐Ÿ‘€ Example
{
"name": "pre-roll",
"breakId": "fb819c48-5760-4d94-9c5b-4fa52f61a998",
"startTime": 0,
"breakType": "linear",
"podSize": 2
}
๐Ÿ“ƒ Schema properties definition
PropertyTypeDescriptionRequired?
name["null","string"]Ad break name (e.g., pre-roll, mid-roll, and post-roll).โŒ
breakId"string"An identifier for the ad break.โœ…
startTime"number"Playback time in seconds at the start of the ad break.โœ…
breakTypeOne of: linear, nonlinear, companion, Type of ads within the break: linear (take full control of the video for a period of time), nonlinear (run concurrently to the video), companion (accompany the video but placed outside the player).โŒ
podSize["integer","null"]The number of ads to be played within the ad break.โŒ

How to track?โ€‹

Modeled data using the snowplow-media-player dbt packageโ€‹

The media player dbt package contains a fully incremental model that transforms raw media event data into a set of derived tables based around the following data objects: media plays, media stats, media ad views, and media ads.

Derived tableTable description
snowplow_media_player_baseThis derived table summarises the key media player events and metrics of each media element on a media_id and pageview level which is considered as a base aggregation level for media interactions.Docs
snowplow_media_player_plays_by_pageviewThis view removes impressions from the '_base' table to summarise media plays on a page_view by media_id level.Docs
snowplow_media_player_media_statsThis derived table aggregates the '_base' table to individual media_id level, calculating the main KPIs and overall video/audio metrics.Docs
snowplow_media_player_media_ad_viewsThis derived table aggregated individual views of ads during media playback.Docs
snowplow_media_player_media_adsThis derived table aggregates information about ads. Each row represents one ad played within a certain media on a certain platform. Stats about the number of ad clicks, progress reached and more are calculated as total values but also as counts of unique users.Docs