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.playerNameRecommended implementation types
Set playerName inside xdm.mediaCollection.advertisingDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the ad player name as the MediaConstants.AdMetadataKeys.AD_PLAYER key in the metadata HashMap argument to trackEvent(AdStart).
| code language-swift |
|---|
|
Pass the ad player name as the MediaConstants.AdMetadataKeys.AD_PLAYER key in the metadata HashMap argument to trackEvent(AdStart).
| code language-kotlin |
|---|
|
Set playerName inside xdm.mediaCollection.advertisingDetails when calling sendMediaEvent for media.adStart:
| code language-brightscript |
|---|
|
Call the adStart endpoint with playerName inside xdm.mediaCollection.advertisingDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the ad player name in the contextData object using ADB.Media.AdMetadataKeys.AdPlayer:
| code language-javascript |
|---|
|
Pass the ad player name in the context metadata object when tracking the ad start event:
| code language-javascript |
|---|
|
Pass the ad player name in the context data object when tracking the ad start event:
| code language-brightscript |
|---|
|
Include media.ad.playerName in the params object of your adStart POST request:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.