Ad start
The ad start event signals that an individual ad began playing. It must occur inside an Ad break start / Ad break complete pair.
- Prerequisites: Session start, Ad break start
- Associated metric: Ad starts
adBreakStart and adBreakComplete bookends, even when a single ad plays. Without these bookends, ad events are ignored and the ad duration is counted as main content duration.Recommended implementation types
Call sendEvent with eventType: "media.adStart" and the required advertisingDetails:
| code language-javascript |
|---|
|
Pass the ad name, ID, pod position, and length to createAdObject, then call trackEvent.
| code language-swift |
|---|
|
Pass the ad name, ID, pod position, and length to createAdObject, then call trackEvent.
| code language-kotlin |
|---|
|
Call sendMediaEvent with eventType: "media.adStart" and the required advertisingDetails:
| code language-brightscript |
|---|
|
Call the adStart endpoint with the required advertisingDetails:
| code language-sh |
|---|
|
Legacy implementation types (Analytics-only)
Pass the ad name, ID, position, and length to ADB.Media.createAdObject:
| code language-javascript |
|---|
|
Pass the ad name, ID, position, and length to ADBMobile.media.createAdObject:
| code language-javascript |
|---|
|
Build an ad object with adb_media_init_adinfo, then track the event. The ad position within the pod is 1-based.
| code language-brightscript |
|---|
|
Send an adStart POST to the events endpoint:
| code language-json |
|---|
|