This page covers data collection for the Author variable. See Author for the corresponding reporting dimension.
The author variable is the author of the content (for example, "Eleanor Clementine"). Primarily used for audiobooks, but also acceptable for podcasts whose host or producer is the relevant attribution.
a.media.authorc_contextdata.a.media.authorWeb SDK
Set author inside mediaCollection.sessionDetails when calling sendEvent:
alloy("sendEvent", {
xdm: {
eventType: "media.sessionStart",
mediaCollection: {
sessionDetails: {
author: "Eleanor Clementine"
},
playhead: 0
}
}
});
Mobile SDK
Pass the author as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.AUTHOR.
iOS (Swift)
var metadata: [String: String] = [:]
metadata[MediaConstants.AudioMetadataKeys.AUTHOR] = "Eleanor Clementine"
tracker.trackSessionStart(info: mediaObject, metadata: metadata)
Android (Kotlin)
val metadata = HashMap<String, String>()
metadata[MediaConstants.AudioMetadataKeys.AUTHOR] = "Eleanor Clementine"
tracker.trackSessionStart(mediaInfo, metadata)
Roku (BrightScript)
Use createMediaSession to set author inside sessionDetails:
m.aepSdk.createMediaSession({
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"author": "Eleanor Clementine"
},
"playhead": 0
}
}
})
Media Edge API
Call the sessionStart endpoint with author inside mediaCollection.sessionDetails:
{
"events": [{
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"name": "video-123",
"length": 128,
"contentType": "vod",
"playerName": "HTML5 Player",
"channel": "Sports",
"author": "Eleanor Clementine"
},
"playhead": 0
}
}
}]
}
Media SDK
Pass the author in the contextData object using ADB.Media.AudioMetadataKeys.Author:
var contextData = {};
contextData[ADB.Media.AudioMetadataKeys.Author] = "Eleanor Clementine";
tracker.trackSessionStart(mediaInfo, contextData);
Media Collection API
Include media.author in the params object:
{
"playerTime": { "playhead": 0, "ts": 1699523820000 },
"eventType": "sessionStart",
"params": {
"media.author": "Eleanor Clementine"
}
}
See the Media Collection API sessions reference for the full request structure.