Video playback events
How it works
Video events help you observe and report how customers engage with your videos and ad content. Using the specification outlined on this page will help you take advantage of out-of-the-box actions for integrations that rely on video playback events. See Video Playback Events if you want to download the specification or try out video playback events.
Playback events occur in three areas:
- Video: this represents the complete movie, program, or video that a person watches.
- Content: often referred to as a “pod,” this is a group of content within the video—like a video segment with a mid-roll ad would be considered 2 pods (one before the ad and one after).
- Ads: these are the ads that play within the video.
You’ll send events across all three areas to track how profiles engage with your video content.
Playback lifecycle
Remember that a “video” itself represents all of the content (pods) and ads in a session. You’ll want to send playback events not only when a user starts a video, but also when each content pod or ad starts.
Beyond that, you’ll also want to send “heartbeat” events on a regular interval that a content pod or ad plays, helping you determine how long people watch your content. We recommend sending a heartbeat event every 10 seconds.
Video Playback events
Playback events represent the playback events related to the video player itself. Some of these events are things your audience explicitly triggers—play, pause, resume, and so on, but these also cover buffering and other events that affect the player.
When a user presses play, you’ll start with a Video Playback Started event containing a session_id that you’ll use for subsequent events in the session. The session ID helps you track a user’s session with a specific video player and group of content/ads.
So if a page on your website contains two video players, each player should have a separate session and session ID. But, if the page only contained one player and it contained two “video contents” in a row, you’d have one session ID with two “Video Content” events.
When you send a Video Playback Started event, you’ll send arrays of content_asset_ids, content_pod_ids, ad_asset_id, and ad_pod_id—indicating all the potential assets in the playback session. For all other events, you’ll send the individual IDs as strings—indicating the specific pod or asset a person interacts with.
| Event | Description |
|---|---|
Video Playback Started | Sent when a user starts a video. |
Video Playback Paused | Sent when a user pauses a video. |
Video Playback Resumed | Sent when a user resumes a video. |
Video Playback Completed | Sent when a user completes a video. |
Video Playback Buffer Started | Sent when a video starts buffering. |
Video Playback Buffer Completed | Sent when a video stops buffering. |
Video Playback Seek Started | When a user manually seeks to a position in the content or ad in the playback session. Use seek_position to denote where the user is seeking to position to denote where the user’s original position. |
Video Playback Seek Completed | Sent when a user stops seeking through a video. |
Video Playback Interrupted | Sent when playback stops unintentionally (from network loss, browser close/redirect, or app crash). With this event you can pass a property to denote the cause of the interruption. |
Video Playback Exited | Sent when a user navigates away from a playback/stream. |
Video Playback Started
When a user starts a video, you’ll send a Video Playback Started event. This event should contain the following properties. When you start video playback, you’ll define arrays of content_asset_ids and content_pod_ids potentially in the session; these help you understand all the content that could possibly be contained within the session.
All other playback events list an individual content_asset_id and/or content_pod_id.
{
"action": "track",
"event": "Video Playback Started",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_ids": ["0129370"],
"content_pod_ids": ["episode1", "episode2"],
"ad_asset_id": ["ad123", "ad097"],
"ad_pod_id": ["adSegment1", "adSegment2"],
"ad_type": ["pre-roll", "mid-roll"],
"position": 0,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}
Other Playback Events
All playback events aside from Video Playback Started include a content_asset_id and content_pod_id to help you track the relevant content and ad when playback events occur.
The Video Playback Interrupted event includes a method parameter to help you define the method by which playback was interrupted.
Video Playback Paused
{
"action": "track",
"event": "Video Playback Paused",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 0,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Resumed
{
"action": "track",
"event": "Video Playback Resumed",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 20,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Completed
{
"action": "track",
"event": "Video Playback Completed",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 3600,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Buffer Started
{
"action": "track",
"event": "Video Playback Buffer Started",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 1800,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Buffer Completed
{
"action": "track",
"event": "Video Playback Buffer Completed",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 1800,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Seek Started
{
"action": "track",
"event": "Video Playback Seek Started",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"seek_position": 1900,
"position": 1800,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Seek Completed
{
"action": "track",
"event": "Video Playback Seek Completed",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 1900,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false
}
}Video Playback Seek Interrupted
{
"action": "track",
"event": "Video Playback Seek Interrupted",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 1800,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false,
"method": "network loss"
}
}Video Playback Seek Exited
{
"action": "track",
"event": "Video Playback Exited",
"userId": "userId",
"properties": {
"session_id": "12345",
"content_asset_id": "0129370",
"content_pod_id": "episode1",
"position": 3600,
"total_length": 3600,
"bitrate": 100,
"framerate": 29.00,
"video_player": "youtube",
"sound": 42,
"full_screen": true,
"ad_enabled": true,
"quality": "hd1080",
"livestream": false,
}
}- methodstringFor Video Playback Interrupted events only, you can send this property denoting how the playback was interrupted (such as browser redirect, device lock, or call).
Content events
Within a playback session, videos contain “pods” of content. A pod is a group or segment of content or an advertisement.
Imagine you have a playback session that with a single piece of video content and one mid-roll advertisement. This means that your video contains two content pods—one before the mid-roll ad and one after. In this instance, you’d start and complete the first pod of content; you’d start and complete the ad; you’d start and complete the second pod of content. All of this would happen within one playback start.
You should also Video Content Playing on a regular interval as a heartbeat event. This helps you track how long profiles watch your content.
| Event | Description |
|---|---|
Video Content Started | Sent when a user starts a new piece of video content. |
Video Content Playing | Sent when a user is playing a piece of video content. |
Video Content Completed | Sent when a user completes a piece of video content. |
Below are some sample events with definitions for each property you might send in these events.
Video Content Started
{
"action": "track",
"event": "Video Content Started",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"program": "The Last Dance",
"title": "Episode 1",
"description": " Flashbacks chronicle Michael Jordan's college and early NBA days. The Bulls make a preseason trip to Paris amid tensions with GM Jerry Krause.",
"season": "1",
"position": 0,
"total_length": 3600,
"genre": "Documentary",
"publisher": "ESPN",
"full_episode": true,
"keywords": ["NBA", "Basketball", "Jordan", "Chicago Bulls"]
}
}Video Content Playing
{
"action": "track",
"event": "Video Content Playing",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"program": "The Last Dance",
"title": "Episode 1",
"description": " Flashbacks chronicle Michael Jordan's college and early NBA days. The Bulls make a preseason trip to Paris amid tensions with GM Jerry Krause.",
"season": "1",
"position": 800,
"total_length": 3600,
"genre": "Documentary",
"publisher": "ESPN",
"full_episode": true,
"keywords": ["NBA", "Basketball", "Jordan", "Chicago Bulls"]
}
}Video Content Completed
{
"action": "track",
"event": "Video Content Completed",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"program": "The Last Dance",
"title": "Episode 1",
"description": " Flashbacks chronicle Michael Jordan's college and early NBA days. The Bulls make a preseason trip to Paris amid tensions with GM Jerry Krause.",
"season": "1",
"position": 3600,
"total_length": 3600,
"genre": "Documentary",
"publisher": "ESPN",
"full_episode": true,
"keywords": ["NBA", "Basketball", "Jordan", "Chicago Bulls"]
}
}- session_idstringThe unique ID of the overall session used to tie all events generated from a specific playback. This value should be the same across all playback, content, and ad events if they are from the same playback session.
- asset_idstringThe ID of the video a user interacted with.
- pod_idstringThe ID of the content "pod" in a playback session. Imagine a video that contains content and an ad; that means the video contains two pods—one for the content and one for the ad. This is the specific piece of content that the user interacted with.
- programstringThe name of the program or show the content belongs to (if applicable).
- titlestringThe title of the video content/pod.
- descriptionstringThe description of the video content/pod.
- seasonstringThe season the video content/pod belongs to, if applicable.
- positionintegerThe current index position in seconds of the playhead, including the duration of any ads seen (if available). If the playback is a livestream, check the documentation for relevant destinations for details on how to correctly pass the playhead position.
- total_lengthintegerThe total duration of the content/asset in seconds. Note that this is not the duration of the video itself or the playback, but a piece of a complete "pod" of content. If the content is an ad in the video, this is the length of the ad.
- genrestringThe genre of the video content/pod.
- publisherstringThe publisher of the video content/pod.
- channelstringThe channel the video content/pod belongs to or is aired on, like
hgtvormy_youtube_channel. - full_episodebooleanSet to
trueif the content is a full episode of a show. - livestreambooleanSet to
trueif the content is a livestream. - airdatestring(date-time)The ISO-8601 date-time when the video content/pod originally aired or was published.
- bitrateintegerThe current kbps.
- framerateintegerThe average frames per second (fps).
- keywordsarray of [ strings ]Keywords associated with the video content/pod.
Ad events
Ad events are similar to content events, but they represent the ads that play within a video. Ads can also be “pods”—like a group of ads For example, imagine that your video has two pre-roll ads, one mid-roll ad, and one post-roll ad. This results in three ad “pods”:
- ad pod 1: plays the two pre-roll ads
- ad pod 2: plays the one mid-roll ad
- ad pod 3: plays the one post-roll ad
| Event | Description |
|---|---|
Video Ad Started | Sent when a user starts a new ad. |
Video Ad Playing | Sent when a user is playing an ad. |
Video Ad Completed | Sent when a user finishes an ad. |
Below are some sample events with definitions for each property you might send in these events.
Video Ad Started
{
"action": "track",
"event": "Video Ad Started",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"type": "pre-roll",
"title": "The New New Thing!",
"position": 0,
"total_length": 30,
"publisher": "Apple",
"load_type": "dynamic"
}
}Video Ad Playing
{
"action": "track",
"event": "Video Ad Playing",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"type": "pre-roll",
"title": "The New New Thing!",
"position": 10,
"total_length": 30,
"publisher": "Apple",
"load_type": "dynamic"
}
}Video Ad Completed
{
"action": "track",
"event": "Video Ad Completed",
"userId": "userId",
"properties": {
"session_id": "abcde",
"asset_id": "8675309",
"pod_id": "segment1",
"type": "pre-roll",
"title": "The New New Thing!",
"position": 30,
"total_length": 30,
"publisher": "Apple",
"load_type": "dynamic"
}
}- session_idstringThe unique ID of the overall session used to tie all events generated from a specific playback. This value should be the same across all playback, content, and ad events if they are from the same playback session.
- asset_idstringThe ID of the video a user interacted with.
- pod_idstringThe ID of the content "pod" in a playback session. Imagine a video that contains content and an ad; that means the video contains two pods—one for the content and one for the ad. This is the specific piece of content that the user interacted with.
- pod_positionintegerThe position of the pod/asset relative to other assets in the same pod. If your ad pod plays 3 ads, you would indicate if this is add number 1, 2, or 3.
- pod_lengthintegerThe number of ad assets in the ad-pod
- typestringThe ad type. Values can include pre-roll, mid-roll, and post-roll.Accepted values:
pre-roll,mid-roll,post-roll - titlestringThe title of the ad.
- positionintegerThe current index position in seconds of the playhead, with respect to the length of the ad.
- total_lengthintegerThe total duration of the ad in seconds.
- publisherstringThe ad's publisher.
- load_typestringSet to
dynamicif you insert ads dynamically andlinearif ads are the same for all viewers.Accepted values:dynamic,linear - contentobjectFor video destinations that require you to send content metadata with ad events, you can send all the content metadata in this object—like
content.title, etc. - quartileintegerSpecifies the quartile of the ad that a viewer reached. If you use our client-side libraries, we'll automatically track this for you.
Heartbeat events
You should send a “heartbeat” event called Video Content Playing or Video Ad Playing every 10 seconds to indicate that a video (or ad) is still playing. This event contains the following properties:
Video Content Playing
- session_idstringThe unique ID of the overall session used to tie all events generated from a specific playback. This value should be the same across all playback, content, and ad events if they are from the same playback session.
- asset_idstringThe ID of the video a user interacted with.
- pod_idstringThe ID of the content "pod" in a playback session. Imagine a video that contains content and an ad; that means the video contains two pods—one for the content and one for the ad. This is the specific piece of content that the user interacted with.
- programstringThe name of the program or show the content belongs to (if applicable).
- titlestringThe title of the video content/pod.
- descriptionstringThe description of the video content/pod.
- seasonstringThe season the video content/pod belongs to, if applicable.
- positionintegerThe current index position in seconds of the playhead, including the duration of any ads seen (if available). If the playback is a livestream, check the documentation for relevant destinations for details on how to correctly pass the playhead position.
- total_lengthintegerThe total duration of the content/asset in seconds. Note that this is not the duration of the video itself or the playback, but a piece of a complete "pod" of content. If the content is an ad in the video, this is the length of the ad.
- genrestringThe genre of the video content/pod.
- publisherstringThe publisher of the video content/pod.
- channelstringThe channel the video content/pod belongs to or is aired on, like
hgtvormy_youtube_channel. - full_episodebooleanSet to
trueif the content is a full episode of a show. - livestreambooleanSet to
trueif the content is a livestream. - airdatestring(date-time)The ISO-8601 date-time when the video content/pod originally aired or was published.
- bitrateintegerThe current kbps.
- framerateintegerThe average frames per second (fps).
- keywordsarray of [ strings ]Keywords associated with the video content/pod.
Video Ad Playing
- session_idstringThe unique ID of the overall session used to tie all events generated from a specific playback. This value should be the same across all playback, content, and ad events if they are from the same playback session.
- asset_idstringThe ID of the video a user interacted with.
- pod_idstringThe ID of the content "pod" in a playback session. Imagine a video that contains content and an ad; that means the video contains two pods—one for the content and one for the ad. This is the specific piece of content that the user interacted with.
- pod_positionintegerThe position of the pod/asset relative to other assets in the same pod. If your ad pod plays 3 ads, you would indicate if this is add number 1, 2, or 3.
- pod_lengthintegerThe number of ad assets in the ad-pod
- typestringThe ad type. Values can include pre-roll, mid-roll, and post-roll.Accepted values:
pre-roll,mid-roll,post-roll - titlestringThe title of the ad.
- positionintegerThe current index position in seconds of the playhead, with respect to the length of the ad.
- total_lengthintegerThe total duration of the ad in seconds.
- publisherstringThe ad's publisher.
- load_typestringSet to
dynamicif you insert ads dynamically andlinearif ads are the same for all viewers.Accepted values:dynamic,linear - contentobjectFor video destinations that require you to send content metadata with ad events, you can send all the content metadata in this object—like
content.title, etc. - quartileintegerSpecifies the quartile of the ad that a viewer reached. If you use our client-side libraries, we'll automatically track this for you.
Resuming playback
When you send a Video Playback Resumed event, you should also send a heartbeat event (Video Content Playing or Video Ad Playing). Make sure you resume your 10 second heartbeats when users resume video playback (likely after you sent a Video Playback Paused event).
Video quality event
As with pausing and resuming video, you should also send events when your audience changes video quality settings. We don’t have actions that hinge specifically on playback quality changes, but tracking quality can help you figure out the performance of your video content—whether your users can stream it in its original resolution or if they need to change it.
A quality change event should contain the following properties.
- bitrateintegerThe current kbps.
- framerateintegerThe average frames per second (fps).
- startupTimeintegerThe time it takes for the video to start playing.
- droppedFramesintegerThe number of frames dropped during playback.