This page covers data collection for the Genre variable. See Genre for the corresponding reporting dimension.
The genre variable is the content genre as defined by the producer (for example, "Drama", "Comedy", or "Drama,Action"). Comma-delimit multiple values when the content fits more than one genre. In reporting, the list variable splits each value into a separate line item, with each line item receiving equal metric weight.
xdm.mediaReporting.sessionDetails.genreList (a list field). The older xdm.mediaReporting.sessionDetails.genre path remains functional but genreList is recommended.a.media.genrec_contextdata.a.media.genreRecommended implementation types
Set genre inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the genre string as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.GENRE.
| code language-swift |
|---|
|
Pass the genre string as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.GENRE.
| code language-kotlin |
|---|
|
Use createMediaSession to set genre inside sessionDetails:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with genre inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the genre in the contextData object using ADB.Media.VideoMetadataKeys.Genre:
| code language-javascript |
|---|
|
Use ADBMobile.media.VideoMetadataKeys.GENRE to set the genre in the StandardMediaMetadata property of the media object before calling trackSessionStart:
| code language-javascript |
|---|
|
Include media.genre in the params object:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.