Timeline 2 - User abandons session timeline--2-user-abandons-session
VOD, Pre-roll ad, mid-roll ads, user abandons content early
The following diagrams illustrate the playhead timeline and the corresponding timeline of a user’s actions. The details for each action and its accompanying requests are presented below.
Action details
Action 1 - Start session Action-1
/api/v1/sessions
This call signals the user’s intention to play a video. It returns a Session ID ( {sid}
) to the client that is used to identify all subsequent tracking calls within the session. The player state is not yet “playing”, but is instead “starting”. Mandatory session parameters must be included in the params
map in the request body. On the backend, this call generates an Adobe Analytics initiate call. For information about sessions, see the Media Collection API documentation.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "sessionStart",
"params": {
"media.playerName": "sample-html5-api-player",
"analytics.trackingServer": "[ _YOUR-TS_ ]",
"analytics.reportSuite": "[ _YOUR-RSID_ ]",
"analytics.visitorId": "[ _YOUR-VISITOR-ID_ ]",
"media.contentType": "VOD",
"media.length": 60.3333333333333,
"media.id": "VA API Sample Player",
"visitor.marketingCloudOrgId": "[YOUR-MCID]",
"media.name": "ClickMe",
"media.channel": "sample-channel",
"media.sdkVersion": "va-api-0.0.0",
"analytics.enableSSL": false
}
}
Action 2 - Ping timer start Action-2
Start your app’s ping timer. First ping event should then fire 1 second in if there are pre-roll ads, 10 seconds in otherwise.
Action 3 - Ad break start Action-3
/api/v1/sessions/{sid}/events
Pre-roll ads must be tracked. Ads can only be tracked within an ad break.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "adBreakStart",
"params": {
"media.ad.podFriendlyName": "ad_pod1",
"media.ad.podIndex": 0,
"media.ad.podSecond": 0
}
}
Action 4 - Ad start Action-4
/api/v1/sessions/{sid}/events
A 12 second ad starts.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "adStart",
"params": {
"media.ad.podFriendlyName": "ad_pod1",
"media.ad.name": "Ad 1",
"media.ad.id": "002",
"media.ad.length": 7,
"media.ad.podPosition": 1,
"media.ad.playerName": "Sample Player",
"media.ad.advertiser": "Ad Guys",
"media.ad.campaignId": "1",
"media.ad.creativeId": "42",
"media.ad.siteId": "XYZ",
"media.ad.creativeURL": "https://xyz-creative.com",
"media.ad.placementId": "sample-placement2"
},
}
Action 5 - Ad pings Action-5
/api/v1/sessions/{sid}/events
Ping the backend every 1 second. (Subsequent ad pings not shown, in the interest of brevity.)
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "ping"
}
Action 6 - Ad complete Action-6
/api/v1/sessions/{sid}/events
The first pre-roll ad is over.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "adComplete"
}
Action 7 - Ad break complete Action-7
/api/v1/sessions/{sid}/events
The ad break is over. Throughout the ad break, the player has remained in the “playing” state.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "adBreakComplete"
}
Action 8 - Play content Action-8
/api/v1/sessions/{sid}/events
Move the player to the “playing” state; begin tracking the start of content playback.
{
"playerTime": {
"playhead": 0,
"ts": "<timestamp>"
},
"eventType": "play",
"qoeData": {
"bitrate": 10000
}
}
Action 9 - Ping Action-9
/api/v1/sessions/{sid}/events
Ping the backend every 10 seconds.
{
"playerTime": {
"playhead": 8,
"ts": "<timestamp>"
},
"eventType": "ping"
}
Action 10 - Ping Action-10
/api/v1/sessions/{sid}/events
Ping the backend every 10 seconds.
{
"playerTime": {
"playhead": 18,
"ts": "<timestamp>"
},
"eventType": "ping"
}
Action 11 - Error Action-11
/api/v1/sessions/{sid}/events
{
"playerTime": {
"playhead": 20,
"ts": "<timestamp>"
},
"eventType": "error"
}
Action 12 - Play content Action-12
/api/v1/sessions/{sid}/events
{
"playerTime": {
"playhead": 18,
"ts": "<timestamp>"
},
"eventType":"play",
"qoeData": {
"bitrate": 10000
}
}
Action 13 - Ping Action-13
/api/v1/sessions/{sid}/events
Ping the backend every 10 seconds.
{
"playerTime": {
"playhead": 28,
"ts": "<timestamp>"
},
"eventType": "ping"
}
Action 14 - Ad break start Action-14
/api/v1/sessions/{sid}/events
Mid-roll ad of 8 seconds duration: send adBreakStart
.
{
"playerTime": {
"playhead": 33,
"ts": "<timestamp>"
},
"eventType":"adBreakStart",
"params": {
"media.ad.podFriendlyName": "ad_pod2",
"media.ad.podIndex": 1,
"media.ad.podSecond": 33
}
}
Action 15 - Ad start Action-15
/api/v1/sessions/{sid}/events
Track the mid-roll ad.
{
"playerTime": { "playhead": 33, "ts": "<timestamp>"
},
"eventType": "adStart",
"params": {
"media.ad.podFriendlyName": "ad_pod1",
"media.ad.name": "Ad 1",
"media.ad.id": "002",
"media.ad.length": 8,
"media.ad.podPosition": 1,
"media.ad.playerName": "Sample Player",
"media.ad.advertiser": "Ad Guys",
"media.ad.campaignId": "7",
"media.ad.creativeId": "40",
"media.ad.siteId": "XYZ",
"media.ad.creativeURL": "https://example.com",
"media.ad.placementId": "sample_placement2"
},
}
Action 16 - Close app Action-16
/api/v1/sessions/{sid}/events
Send sessionEnd
to the VA backend to indicate that the session should be closed immediately, with no further processing.
{
"playerTime": {
"playhead": 33,
"ts": "<timestamp>"
},
"eventType": "sessionEnd"
}