This page covers data collection for the Chapter length variable. See Chapter length for the corresponding reporting dimension.
The chapter length variable is the duration of the chapter, in seconds. Set it on every media.chapterStart event.
a.media.chapter.lengthc_contextdata.a.media.chapter.lengthRecommended implementation types
Set length inside xdm.mediaCollection.chapterDetails when calling sendEvent:
| code language-javascript |
|---|
|
Pass the chapter length in seconds as the third argument to createChapterObject.
| code language-swift |
|---|
|
Pass the chapter length in seconds as the third argument to createChapterObject.
| code language-kotlin |
|---|
|
Set length inside xdm.mediaCollection.chapterDetails when calling sendMediaEvent for media.chapterStart:
| code language-brightscript |
|---|
|
Call the chapterStart endpoint with length inside xdm.mediaCollection.chapterDetails:
| code language-json |
|---|
|
Legacy implementation types (Analytics-only)
Pass the chapter length as the third argument to ADB.Media.createChapterObject:
| code language-javascript |
|---|
|
Pass the chapter length in seconds as the third argument (length) to ADBMobile.media.createChapterObject:
| code language-javascript |
|---|
|
Include media.chapter.length in the params object of your chapterStart POST request:
| code language-json |
|---|
|
See the Media Collection API events reference for the full request structure.