This page covers data collection for the Album variable. See Album for the corresponding reporting dimension.
The album variable is the name of the album the audio track belongs to (for example, "Pinegrove"). Use it to roll up engagement across tracks from the same album.
a.media.albumc_contextdata.a.media.albumRecommended implementation types
Set album inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the album as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.ALBUM.
| code language-swift |
|---|
|
Pass the album as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.AudioMetadataKeys.ALBUM.
| code language-kotlin |
|---|
|
Use createMediaSession to set album inside sessionDetails:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with album inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the album in the contextData object using ADB.Media.AudioMetadataKeys.Album:
| code language-javascript |
|---|
|
Use ADBMobile.media.AudioMetadataKeys.ALBUM to set the album in the StandardMediaMetadata property of the media object before calling trackSessionStart:
| code language-javascript |
|---|
|
Use MEDIA_AudioMetadataKeyALBUM to set the album in the standard metadata of the media object before calling mediaTrackSessionStart:
| code language-brightscript |
|---|
|
Include media.album in the params object:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.