This page covers data collection for the Ad break start time variable. See Pod position for the corresponding reporting dimension.
The ad break start time variable is the offset of the ad break inside the content, measured in seconds. For a pre-roll the value is 0; for a mid-roll the value is the playhead position at which the break begins.
a.media.ad.podSecondc_contextdata.a.media.ad.podSecondWeb SDK
Set offset inside mediaCollection.advertisingPodDetails when calling sendEvent:
alloy("sendEvent", {
xdm: {
eventType: "media.adBreakStart",
mediaCollection: {
advertisingPodDetails: {
friendlyName: "mid-roll-1",
index: 2,
offset: 90
},
sessionID: "{sid}",
playhead: 90
}
}
});
Mobile SDK
Pass the start time in seconds as the third argument to createAdBreakObject.
iOS (Swift)
let adBreakObject = Media.createAdBreakObjectWith(name: "mid-roll-1",
position: 2,
startTime: 90)
tracker.trackEvent(event: MediaEvent.AdBreakStart, info: adBreakObject, metadata: nil)
Android (Kotlin)
val adBreakObject = Media.createAdBreakObject("mid-roll-1",
2L,
90.0)
tracker.trackEvent(Media.Event.AdBreakStart, adBreakObject, null)
Roku (BrightScript)
Set offset inside mediaCollection.advertisingPodDetails when calling sendMediaEvent for media.adBreakStart:
m.aepSdk.sendMediaEvent({
"xdm": {
"eventType": "media.adBreakStart",
"mediaCollection": {
"advertisingPodDetails": {
"friendlyName": "mid-roll-1",
"index": 2,
"offset": 90
},
"playhead": 90
}
}
})
Media Edge API
Call the adBreakStart endpoint with offset inside mediaCollection.advertisingPodDetails:
{
"events": [{
"xdm": {
"eventType": "media.adBreakStart",
"mediaCollection": {
"advertisingPodDetails": {
"index": 2,
"offset": 90
},
"sessionID": "{sid}",
"playhead": 90
}
}
}]
}
Media SDK
Pass the start time as the third argument to ADB.Media.createAdBreakObject:
var adBreakInfo = ADB.Media.createAdBreakObject(
"mid-roll-1",
2,
90
);
tracker.trackEvent(ADB.Media.Event.AdBreakStart, adBreakInfo, null);
Media Collection API
Include media.ad.podSecond in the params object of your adBreakStart POST request:
{
"playerTime": { "playhead": 90, "ts": 1699523820000 },
"eventType": "adBreakStart",
"params": {
"media.ad.podSecond": 90
}
}
See the Media Collection API events reference for the full request structure.