This page covers data collection for the Chapter position variable. See Chapter position for the corresponding reporting dimension.
The chapter position variable is the index of the chapter inside the content, starting at 1 (typical) or 0 (depending on your convention). Use a stable index per chapter so that the same chapter rolls up across sessions.
a.media.chapter.positionc_contextdata.a.media.chapter.positionRecommended implementation types
Set index inside xdm.mediaCollection.chapterDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the chapter position as the second argument to createChapterObject.
| code language-swift |
|---|
|
Pass the chapter position as the second argument to createChapterObject.
| code language-kotlin |
|---|
|
Set index inside xdm.mediaCollection.chapterDetails when calling sendMediaEvent for media.chapterStart:
| code language-brightscript |
|---|
|
Call the chapterStart endpoint with index inside xdm.mediaCollection.chapterDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the chapter position as the second argument to ADB.Media.createChapterObject:
| code language-javascript |
|---|
|
Pass the chapter position as the second argument to ADBMobile.media.createChapterObject:
| code language-javascript |
|---|
|
Pass the chapter position as the second argument (position) to adb_media_init_chapterinfo:
| code language-brightscript |
|---|
|
Include media.chapter.index in the params object of your chapterStart POST request:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.