This page covers data collection for the Show type variable. See Show type for the corresponding reporting dimension.
The show type variable identifies the content format using a string integer code:
"0": Full episode"1": Preview or trailer"2": Clip"3": Other
Use it to separate full-program viewing from short-form content like trailers and clips when measuring engagement.
a.media.typeWeb SDK
Set showType inside mediaCollection.sessionDetails when calling sendEvent:
alloy("sendEvent", {
xdm: {
eventType: "media.sessionStart",
mediaCollection: {
sessionDetails: {
showType: "0"
},
playhead: 0
}
}
});
Mobile SDK
Pass the show type as a metadata key in the HashMap argument to trackSessionStart. Use MediaConstants.VideoMetadataKeys.SHOW_TYPE.
iOS (Swift)
var metadata: [String: String] = [:]
metadata[MediaConstants.VideoMetadataKeys.SHOW_TYPE] = "0"
tracker.trackSessionStart(info: mediaObject, metadata: metadata)
Android (Kotlin)
val metadata = HashMap<String, String>()
metadata[MediaConstants.VideoMetadataKeys.SHOW_TYPE] = "0"
tracker.trackSessionStart(mediaInfo, metadata)
Roku (BrightScript)
Use createMediaSession to set showType inside sessionDetails:
m.aepSdk.createMediaSession({
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"showType": "0"
},
"playhead": 0
}
}
})
Media Edge API
Call the sessionStart endpoint with showType inside mediaCollection.sessionDetails:
{
"events": [{
"xdm": {
"eventType": "media.sessionStart",
"mediaCollection": {
"sessionDetails": {
"name": "video-123",
"length": 128,
"contentType": "vod",
"playerName": "HTML5 Player",
"channel": "Sports",
"showType": "0"
},
"playhead": 0
}
}
}]
}
Media SDK
Pass the show type in the contextData object using ADB.Media.VideoMetadataKeys.ShowType:
var contextData = {};
contextData[ADB.Media.VideoMetadataKeys.ShowType] = "0";
tracker.trackSessionStart(mediaInfo, contextData);
Media Collection API
Include media.showType in the params object:
{
"playerTime": { "playhead": 0, "ts": 1699523820000 },
"eventType": "sessionStart",
"params": {
"media.showType": "0"
}
}
See the Media Collection API sessions reference for the full request structure.