Ad complete
The ad complete event signals that an individual ad finished playing. Send it after the ad plays to completion. If the viewer skips the ad, send Ad skip instead.
- Prerequisites: Session start, Ad break start, Ad start
- Associated metric: Ad completes
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.adComplete":
| code language-javascript |
|---|
|
iOS
Call trackEvent with the AdComplete event type.
| code language-swift |
|---|
|
Android
Call trackEvent with the AdComplete event type.
| code language-kotlin |
|---|
|
Roku
Call sendMediaEvent with eventType: "media.adComplete":
| code language-brightscript |
|---|
|
Media Edge API
Call the adComplete endpoint:
| code language-sh |
|---|
|
Legacy implementation types (Analytics-only)
Media SDK JS 3.x
Call trackEvent with the AdComplete event type:
| code language-javascript |
|---|
|
Chromecast
Call trackEvent with the AdComplete event type:
| code language-javascript |
|---|
|
Media Collection API
Send an adComplete POST to the events endpoint:
| code language-json |
|---|
|
recommendation-more-help
media-analytics-help