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
IMPORTANT
This event must be surrounded by
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
Web SDK
Call sendEvent with eventType: "media.adStart" and the required advertisingDetails:
| code language-javascript |
|---|
|
iOS
Pass the ad name, ID, pod position, and length to createAdObject, then call trackEvent.
| code language-swift |
|---|
|
Android
Pass the ad name, ID, pod position, and length to createAdObject, then call trackEvent.
| code language-kotlin |
|---|
|
Roku
Call sendMediaEvent with eventType: "media.adStart" and the required advertisingDetails:
| code language-brightscript |
|---|
|
Media Edge API
Call the adStart endpoint with the required advertisingDetails:
| code language-sh |
|---|
|
Legacy implementation types (Analytics-only)
Media SDK JS 3.x
Pass the ad name, ID, position, and length to ADB.Media.createAdObject:
| code language-javascript |
|---|
|
Chromecast
Pass the ad name, ID, position, and length to ADBMobile.media.createAdObject:
| code language-javascript |
|---|
|
Media Collection API
Send an adStart POST to the events endpoint:
| code language-json |
|---|
|
recommendation-more-help
media-analytics-help