This page covers data collection for the Asset ID variable. See Asset ID for the corresponding reporting dimension.
The asset ID variable is the unique identifier for the underlying media asset (for example, an episode ID, a movie ID, or a live event ID). Typically sourced from metadata authorities such as EIDR, TMS/Gracenote, or Rovi, but proprietary or in-house IDs are also accepted. Use it when you need to compare engagement across distribution platforms that may assign different content IDs to the same underlying asset.
ID: assetID.a.media.assetc_contextdata.a.media.assetRecommended implementation types
Set assetID inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the asset ID as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.ASSET_ID.
| code language-swift |
|---|
|
Pass the asset ID as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.ASSET_ID.
| code language-kotlin |
|---|
|
Use createMediaSession to set assetID inside sessionDetails:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with assetID inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the asset ID in the contextData object using ADB.Media.VideoMetadataKeys.AssetId:
| code language-javascript |
|---|
|
Use ADBMobile.media.VideoMetadataKeys.ASSET_ID to set the asset ID in the StandardMediaMetadata property of the media object before calling trackSessionStart:
| code language-javascript |
|---|
|
Include media.assetId in the params object:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.