This page covers data collection for the Ad player name variable. See Ad player name for the corresponding reporting dimension.
The ad player name variable identifies which player rendered each ad (for example, "Freewheel", "Google IMA"). The ad player can differ from the main content player when ads are stitched in by a server-side ad insertion service. Use this variable to compare quality and completion across ad-serving stacks.
a.media.ad.playerNamec_contextdata.a.media.ad.playerNameWeb SDK
Set playerName inside mediaCollection.advertisingDetails when calling sendEvent:
alloy("sendEvent", {
xdm: {
eventType: "media.adStart",
mediaCollection: {
advertisingDetails: {
name: "ad-2125",
playerName: "Freewheel"
},
sessionID: "{sid}",
playhead: 0
}
}
});
Mobile SDK
Pass the ad player name as the MediaConstants.AdMetadataKeys.AD_PLAYER key in the metadata HashMap argument to trackEvent(AdStart).
iOS (Swift)
var metadata: [String: String] = [:]
metadata[MediaConstants.AdMetadataKeys.AD_PLAYER] = "Freewheel"
tracker.trackEvent(event: MediaEvent.AdStart, info: adObject, metadata: metadata)
Android (Kotlin)
val metadata = HashMap<String, String>()
metadata[MediaConstants.AdMetadataKeys.AD_PLAYER] = "Freewheel"
tracker.trackEvent(Media.Event.AdStart, adObject, metadata)
Roku (BrightScript)
Set playerName inside mediaCollection.advertisingDetails when calling sendMediaEvent for media.adStart:
m.aepSdk.sendMediaEvent({
"xdm": {
"eventType": "media.adStart",
"mediaCollection": {
"advertisingDetails": {
"name": "ad-2125",
"playerName": "Freewheel",
"length": 15,
"podPosition": 0
},
"playhead": 0
}
}
})
Media Edge API
Call the adStart endpoint with playerName inside mediaCollection.advertisingDetails:
{
"events": [{
"xdm": {
"eventType": "media.adStart",
"mediaCollection": {
"advertisingDetails": {
"name": "ad-2125",
"length": 15,
"playerName": "Freewheel",
"podPosition": 0
},
"sessionID": "{sid}",
"playhead": 0
}
}
}]
}
Media SDK
Pass the ad player name in the contextData object using ADB.Media.AdMetadataKeys.AdPlayer:
var contextData = {};
contextData[ADB.Media.AdMetadataKeys.AdPlayer] = "Freewheel";
tracker.trackEvent(ADB.Media.Event.AdStart, adInfo, contextData);
Media Collection API
Include media.ad.playerName in the params object of your adStart POST request:
{
"playerTime": { "playhead": 0, "ts": 1699523820000 },
"eventType": "adStart",
"params": {
"media.ad.playerName": "Freewheel"
}
}
See the Media Collection API events reference for the full request structure.