Chapter complete

The chapter complete event signals that a chapter finished playing. Send it when the viewer reaches the end of a chapter. If the viewer skips the chapter, send Chapter skip instead.

Web SDK

Call sendEvent with eventType: "media.chapterComplete":

code language-javascript
alloy("sendEvent", {
  xdm: {
    eventType: "media.chapterComplete",
    mediaCollection: {
      sessionID: "{sid}",
      playhead: 240
    }
  }
});
iOS

Call trackEvent with the ChapterComplete event type.

code language-swift
tracker.trackEvent(event: MediaEvent.ChapterComplete, info: nil, metadata: nil)
Android

Call trackEvent with the ChapterComplete event type.

code language-kotlin
tracker.trackEvent(Media.Event.ChapterComplete, null, null)
Roku Edge

Call sendMediaEvent with eventType: "media.chapterComplete":

code language-brightscript
m.aepSdk.sendMediaEvent({
    "xdm": {
        "eventType": "media.chapterComplete",
        "mediaCollection": {
            "playhead": 240
        }
    }
})
Media Edge API

Call the chapterComplete endpoint:

code language-sh
curl -X POST "https://edge.adobedc.net/ee/va/v1/chapterComplete?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
  "events": [{
    "xdm": {
      "eventType": "media.chapterComplete",
      "mediaCollection": {
        "sessionID": "{sid}",
        "playhead": 240
      },
      "timestamp": "YYYY-08-20T22:41:40+00:00"
    }
  }]
}'

Legacy implementation types (Analytics-only)

Media SDK JS 3.x

Call trackEvent with the ChapterComplete event type:

code language-javascript
tracker.trackEvent(ADB.Media.Event.ChapterComplete, null, null);
Chromecast

Call trackEvent with the ChapterComplete event type:

code language-javascript
ADBMobile.media.trackEvent(ADBMobile.media.Event.ChapterComplete);
Roku 2.x

Call mediaTrackEvent with the MEDIA_CHAPTER_COMPLETE event type:

code language-brightscript
adb = ADBMobile()
adb.mediaTrackEvent(adb.MEDIA_CHAPTER_COMPLETE)
Media Collection API

Send a chapterComplete POST to the events endpoint:

code language-json
{
  "playerTime": { "playhead": 240, "ts": 1699523820000 },
  "eventType": "chapterComplete"
}
recommendation-more-help
media-analytics-help