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.
- Prerequisites: Session start, Chapter start
- Associated metric: Chapter completes
Web SDK
Call sendEvent with eventType: "media.chapterComplete":
alloy("sendEvent", {
xdm: {
eventType: "media.chapterComplete",
mediaCollection: {
sessionID: "{sid}",
playhead: 240
}
}
});
Mobile SDK
Call trackEvent with the ChapterComplete event type.
iOS (Swift)
tracker.trackEvent(event: MediaEvent.ChapterComplete, info: nil, metadata: nil)
Android (Kotlin)
tracker.trackEvent(Media.Event.ChapterComplete, null, null)
Roku (BrightScript)
Call sendMediaEvent with eventType: "media.chapterComplete":
m.aepSdk.sendMediaEvent({
"xdm": {
"eventType": "media.chapterComplete",
"mediaCollection": {
"playhead": 240
}
}
})
Media Edge API
Call the chapterComplete endpoint:
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"
}
}]
}'
Media SDK
Call trackEvent with the ChapterComplete event type:
tracker.trackEvent(ADB.Media.Event.ChapterComplete, null, null);
Media Collection API
Send a chapterComplete POST to the events endpoint:
{
"playerTime": { "playhead": 240, "ts": 1699523820000 },
"eventType": "chapterComplete"
}
recommendation-more-help
media-analytics-help