This page covers data collection for the Content rating variable. See Content rating for the corresponding reporting dimension.
The content rating variable is the audience rating as defined by TV Parental Guidelines ("TVY", "TVG", "TVPG", "TVMA") or any regional rating system you use. Use it to compare engagement and ad load across rating tiers.
a.media.ratingc_contextdata.a.media.ratingRecommended implementation types
Set rating inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the rating as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.RATING.
| code language-swift |
|---|
|
Pass the rating as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.RATING.
| code language-kotlin |
|---|
|
Use createMediaSession to set rating inside sessionDetails:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with rating inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the rating in the contextData object using ADB.Media.VideoMetadataKeys.Rating:
| code language-javascript |
|---|
|
Use ADBMobile.media.VideoMetadataKeys.RATING to set the content rating in the StandardMediaMetadata property of the media object before calling trackSessionStart:
| code language-javascript |
|---|
|
Include media.rating in the params object:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.