This page covers data collection for the Day part variable. See Day part for the corresponding reporting dimension.
The day part variable is the time-of-day bucket when the content was broadcast or played (for example, "Morning", "Afternoon", "Primetime", or "Late Night"). Any string is accepted. Use it to compare engagement across dayparts independent of the viewer’s local time zone.
a.media.dayPartc_contextdata.a.media.dayPartRecommended implementation types
Set dayPart inside xdm.mediaCollection.sessionDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the day part as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.DAY_PART.
| code language-swift |
|---|
|
Pass the day part as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.DAY_PART.
| code language-kotlin |
|---|
|
Use createMediaSession to set dayPart inside sessionDetails:
| code language-brightscript |
|---|
|
Call the sessionStart endpoint with dayPart inside xdm.mediaCollection.sessionDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the day part in the contextData object using ADB.Media.VideoMetadataKeys.DayPart:
| code language-javascript |
|---|
|
Use ADBMobile.media.VideoMetadataKeys.DAY_PART to set the day part in the StandardMediaMetadata property of the media object before calling trackSessionStart:
| code language-javascript |
|---|
|
Use MEDIA_VideoMetadataKeyDAY_PART to set the day part in the standard metadata of the media object before calling mediaTrackSessionStart:
| code language-brightscript |
|---|
|
Include media.dayPart in the params object:
| code language-json |
|---|
|
See the Media Collection API sessions reference for the full request structure.