Content channel

This page covers data collection for the Content channel variable. See Content channel for the corresponding reporting dimension.

The content channel variable identifies the distribution station, network, or property where the content plays. It is required for all streaming media implementations. Any string is accepted. Typical values include a network name, a portion of a site path, or an internal property identifier.

Property
Value
Context data variable
a.media.channel
XDM collection field
mediaCollection.sessionDetails.channel
Required
Yes
Sent with
Session start, session close

Web SDK

Set channel inside mediaCollection.sessionDetails when calling sendEvent:

alloy("sendEvent", {
  xdm: {
    eventType: "media.sessionStart",
    mediaCollection: {
      sessionDetails: {
        name: "video-123",
        length: 128,
        contentType: "vod",
        playerName: "HTML5 Player",
        channel: "Sports",
        streamType: "video"
      },
      playhead: 0
    }
  }
});

Mobile SDK

Set the channel through the tracker configuration when creating the tracker, using MediaConstants.TrackerConfig.CHANNEL. The channel is not part of the media object.

iOS (Swift)

var config: [String: Any] = [:]
config[MediaConstants.TrackerConfig.PLAYER_NAME] = "HTML5 Player"
config[MediaConstants.TrackerConfig.CHANNEL] = "Sports"

Media.createTrackerWith(config: config) { tracker in
    self.tracker = tracker
}

Android (Kotlin)

val config = HashMap<String, Any>()
config[MediaConstants.TrackerConfig.PLAYER_NAME] = "HTML5 Player"
config[MediaConstants.TrackerConfig.CHANNEL] = "Sports"

val tracker = Media.createTracker(config)

Roku (BrightScript)

Set channel inside mediaCollection.sessionDetails when calling createMediaSession:

m.aepSdk.createMediaSession({
    "xdm": {
        "eventType": "media.sessionStart",
        "mediaCollection": {
            "sessionDetails": {
                "name": "video-123",
                "length": 128,
                "contentType": "vod",
                "playerName": "Roku Player",
                "channel": "Sports",
                "streamType": "video"
            },
            "playhead": 0
        }
    }
})

Media Edge API

Call the sessionStart endpoint with channel inside mediaCollection.sessionDetails:

{
  "events": [{
    "xdm": {
      "eventType": "media.sessionStart",
      "mediaCollection": {
        "sessionDetails": {
          "name": "video-123",
          "length": 128,
          "contentType": "vod",
          "playerName": "HTML5 Player",
          "channel": "Sports"
        },
        "playhead": 0
      }
    }
  }]
}

Media SDK

Set the channel on ADB.MediaConfig before creating the tracker:

var mediaConfig = new ADB.MediaConfig();
mediaConfig.trackingServer = "your.tracking.server";
mediaConfig.playerName = "HTML5 Player";
mediaConfig.channel = "Sports";

var tracker = ADB.Media.getInstance(mediaConfig);

Media Collection API

Include media.channel in the params object of your sessionStart POST request:

{
  "playerTime": { "playhead": 0, "ts": 1699523820000 },
  "eventType": "sessionStart",
  "params": {
    "media.channel": "Sports"
  }
}

See the Media Collection API sessions reference for the full request structure.

recommendation-more-help
media-analytics-help