
DAI Pod Serving
Dynamic Ad Insertion (DAI) Pod Serving lets you request ad pods for live and video-on-demand (VOD) streams. For more details, see Configure ad pods and break templates.
For livestream, Google Ad Manager supports the following DAI types:- Pod serving redirect: lets you retrieve manifest segments to implement Server-Side Ad Insertion (SSAI). The segments are dynamic URLs, redirecting to either content or ad media files.
- Pod serving manifest: lets you retrieve the complete manifest of the ad pods to implement Server-Side Ad Insertion (SSAI). For more details, see Server guided DAI.
For VOD, Google Ad Manager returns the complete ad pod manifests.

Stitch ads into a livestream
- To start a livestream session, make a stream registration request. Set ad tag parameters unique for the stream request to override the DAI ad tag's default values. For more details about ad targeting, see Supply targeting parameters to your stream.
- Retrieve the unique user session ID from the stream registration response. For more details about using the session ID, see Locate a DAI session ID or debug key and Monitor and debug a specific stream session.
- Make a manifest request to your video stitcher or manifest manipulator, passing the session ID. Repeat the request for manifest updates throughout playback.
- For DASH manifests, make one period template request for the entire session.
- For DASH manifests, cache the period template. For each ad break, retrieve the cached template and populate all macros with the ad break data. For more details about supported macros, see Populate the period template. Then, insert the result period into the final manifest.
- Return the final manifest that contains content or ad media segments for client playback. Playback begins.
- Regularly poll Google Ad Manager for updates of ad metadata using the polling frequency returned in the stream request. Store the ad metadata for looking up ad events.
- During an ad break, the video player loads the media segments and follows Google Ad Manager redirects to the media files.
- During an ad break, listen to the video player for timed metadata, containing ID3 tags. Extract the ad event ID from the ID3 tag to find the associated ad metadata.
- Send media verification pings to Google Ad Manager.
To enhance your revenue, use the IMA SDK on these supported platforms:

Stitch ads into a VOD stream
- Make a stream request to register a VOD stream session. Set ad tag parameters unique for the stream request to override the DAI ad tag's default values. For more details, see Supply targeting parameters to your stream.
- Retrieve the session ID from the stream response. To inspect the stream session, see Locate a DAI session ID or debug key and Monitor and debug a specific stream session.
- Make a manifest request to your video stitcher or manifest manipulator, passing the session ID.
- Use the session ID to request all ad pods at once.
- Retrieve complete manifests of all ad pods. To create the final manifest, stitch the ad pod manifests with the content stream.
- Return the final manifest, containing both content and ad segments.
- Request ad metadata for all ad events. Store the ad metadata for looking up ad events. Playback begins.
- During an ad break, the video player loads the media segments and follows Google Ad Manager redirects to the media files.
- During an ad break, listen for ad events containing ID3 tags. To find the ad event metadata, extract the ad event ID from the ID3 tag and match the ID with the ad metadata.
- Send media verification pings to Google Ad Manager.
To enhance revenue performance, use the IMA SDK on a supported platform: