This page covers data collection for the Label variable. See Label for the corresponding reporting dimension.
The label variable is the name of the record label that released the audio content (for example, "Capitol Records"). Use it to compare engagement across labels in a music or podcast catalog.
a.media.labelc_contextdata.a.media.labelWeb SDK
Set label inside mediaCollection.sessionDetails when calling sendEvent:
alloy("sendEvent", {
xdm: {
eventType: "media.sessionStart",
mediaCollection: {
sessionDetails: {
label: "Capitol Records"
},
playhead: 0
}
}
});
Mobile SDK
Pass the label as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.LABEL.
iOS (Swift)
var metadata: [String: String] = [:]
metadata[MediaConstants.AudioMetadataKeys.LABEL] = "Capitol Records"
tracker.trackSessionStart(info: mediaObject, metadata: metadata)
Android (Kotlin)
val metadata = HashMap<String, String>()
metadata[MediaConstants.AudioMetadataKeys.LABEL] = "Capitol Records"
tracker.trackSessionStart(mediaInfo, metadata)
Roku (BrightScript)
Use createMediaSession to set label inside sessionDetails:
m.aepSdk.createMediaSession({
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"label": "Capitol Records"
},
"playhead": 0
}
}
})
Media Edge API
Call the sessionStart endpoint with label inside mediaCollection.sessionDetails:
{
"events": [{
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"name": "video-123",
"length": 128,
"contentType": "vod",
"playerName": "HTML5 Player",
"channel": "Sports",
"label": "Capitol Records"
},
"playhead": 0
}
}
}]
}
Media SDK
Pass the label in the contextData object using ADB.Media.AudioMetadataKeys.Label:
var contextData = {};
contextData[ADB.Media.AudioMetadataKeys.Label] = "Capitol Records";
tracker.trackSessionStart(mediaInfo, contextData);
Media Collection API
Include media.label in the params object:
{
"playerTime": { "playhead": 0, "ts": 1699523820000 },
"eventType": "sessionStart",
"params": {
"media.label": "Capitol Records"
}
}
See the Media Collection API sessions reference for the full request structure.