This page covers data collection for the Content ID variable. See Content for the corresponding reporting dimension.
The content ID variable uniquely identifies each piece of media content. It is required for all streaming media implementations and is the primary key for the Content reporting dimension. Set it at session start and keep it stable across all sessions for the same asset.
a.media.namec_contextdata.a.media.nameRecommended implementation types
Set name inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the content ID as the mediaId argument to createMediaObject.
| code language-swift |
|---|
|
Pass the content ID as the mediaId argument to createMediaObject.
| code language-kotlin |
|---|
|
Set name inside xdm.mediaCollection.sessionDetails when calling createMediaSession:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with name (the Content ID) inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the content ID as the second argument to ADB.Media.createMediaObject:
| code language-javascript |
|---|
|
Pass the content ID as the second argument to ADBMobile.media.createMediaObject:
| code language-javascript |
|---|
|
Include media.id in the params object of your sessionStart POST request:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.