Author

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.

Property
Value
Context data variable
a.media.author
XDM collection field
xdm.mediaCollection.sessionDetails.author
Audience Manager trait
c_contextdata.a.media.author
Required
No
Sent with
Session start, session close
Web SDK

Set author inside xdm.mediaCollection.sessionDetails when calling sendEvent:

code language-javascript
alloy("sendEvent", {
  xdm: {
    eventType: "media.sessionStart",
    mediaCollection: {
      sessionDetails: {
        author: "Eleanor Clementine"
      },
      playhead: 0
    }
  }
});
iOS

Pass the author as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.AUTHOR.

code language-swift
var metadata: [String: String] = [:]
metadata[MediaConstants.AudioMetadataKeys.AUTHOR] = "Eleanor Clementine"

tracker.trackSessionStart(info: mediaObject, metadata: metadata)
Android

Pass the author as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.AUTHOR.

code language-kotlin
val metadata = HashMap<String, String>()
metadata[MediaConstants.AudioMetadataKeys.AUTHOR] = "Eleanor Clementine"

tracker.trackSessionStart(mediaInfo, metadata)
Roku Edge

Use createMediaSession to set author inside sessionDetails:

code language-brightscript
m.aepSdk.createMediaSession({
    "xdm": {
        "eventType": "media.sessionStart",
        "mediaCollection": {
            "sessionDetails": {
                "author": "Eleanor Clementine"
            },
            "playhead": 0
        }
    }
})
Media Edge API

Call the sessionStart endpoint with author inside xdm.mediaCollection.sessionDetails:

code language-json
{
  "events": [{
    "xdm": {
      "eventType": "media.sessionStart",
      "mediaCollection": {
        "sessionDetails": {
          "name": "video-123",
          "length": 128,
          "contentType": "vod",
          "playerName": "HTML5 Player",
          "channel": "Sports",
          "author": "Eleanor Clementine"
        },
        "playhead": 0
      }
    }
  }]
}

Legacy implementation types (Analytics-only)

Media SDK JS 3.x

Pass the author in the contextData object using ADB.Media.AudioMetadataKeys.Author:

code language-javascript
var contextData = {};
contextData[ADB.Media.AudioMetadataKeys.Author] = "Eleanor Clementine";

tracker.trackSessionStart(mediaInfo, contextData);
Chromecast

Use ADBMobile.media.AudioMetadataKeys.AUTHOR to set the author in the StandardMediaMetadata property of the media object before calling trackSessionStart:

code language-javascript
var mediaInfo = ADBMobile.media.createMediaObject("My Track", "audio-123", 240,
  ADBMobile.media.StreamType.AOD, ADBMobile.media.MediaType.Audio);
var standardMetadata = {};
standardMetadata[ADBMobile.media.AudioMetadataKeys.AUTHOR] = "Eleanor Clementine";
mediaInfo[ADBMobile.media.MediaObjectKey.StandardMediaMetadata] = standardMetadata;
ADBMobile.media.trackSessionStart(mediaInfo, null);
Roku 2.x

Use MEDIA_AudioMetadataKeyAUTHOR to set the author in the standard metadata of the media object before calling mediaTrackSessionStart:

code language-brightscript
adb = ADBMobile()
mediaInfo = adb_media_init_mediainfo("My Track", "audio-123", 240.0, adb.MEDIA_STREAM_TYPE_AOD, adb.MEDIA_TYPE_AUDIO)

standardMetadata = {}
standardMetadata[adb.MEDIA_AudioMetadataKeyAUTHOR] = "Eleanor Clementine"
mediaInfo[adb.MEDIA_STANDARD_MEDIA_METADATA] = standardMetadata

adb.mediaTrackSessionStart(mediaInfo, invalid)
Media Collection API

Include media.author in the params object:

code language-json
{
  "playerTime": { "playhead": 0, "ts": 1699523820000 },
  "eventType": "sessionStart",
  "params": {
    "media.author": "Eleanor Clementine"
  }
}

See the Media Collection API sessions reference for the full request structure.

recommendation-more-help
media-analytics-help