# Google Ad Manager on live

With Google Ad Manager 360, Google decides which ads fill each break of your live stream. OptiView Ads announces the breaks to Google ahead of time, Google assembles the ads into a pod, and the pod plays when the break starts. Use this workflow when you sell your inventory through Google Ad Manager 360, and to reach platforms that need server-side ad insertion.

|                | Google Ad Manager on live                                                                 |
| -------------- | ----------------------------------------------------------------------------------------- |
| Delivery mode  | Server-guided with Google Pod Serving (SGAI), server-side with Google DAI (SSAI), or both |
| Ad decisioning | Google Ad Manager, ahead of the break                                                     |
| Break creation | Scheduled, punched, or detected from the ad markers in your stream                        |
| Your app needs | The OptiView Ads SDK; on Web also Google's IMA DAI SDK                                    |

## Choose a delivery mode

| Delivery mode                                                                                       | How it works                                                                                                                  | Use it for                                                                                          |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [Google Pod Serving](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md) (SGAI) | Google decisions the pod; the SDK inserts it into your untouched stream, guided by the Break Manifest.                        | Web, mobile, and most connected TV apps. Required for the double box, L-shape, and overlay layouts. |
| [Google DAI](https://optiview.dolby.com/docs/ads/integrations/google/dai.md) (SSAI)                 | The Dolby Ads Proxy inserts the break cues into the stream Google reads; Google stitches the ads into the stream for viewers. | Platforms where a client-side SDK is not an option, such as Roku and older connected TV devices.    |

One channel can serve both: the channel steers the [delivery mode per device](https://optiview.dolby.com/docs/ads/workflows.md#hybrid-ad-insertion-sgai-and-ssai), and the SDK picks it up from the Break Manifest.

## Before you start

* The [Google Ad Manager prerequisites](https://optiview.dolby.com/docs/ads/integrations/google.md) — network code and service account — are in place for your organization.
* A [live channel](https://optiview.dolby.com/docs/ads/workflows/live.md#set-up-a-live-channel), connected to Google: with the custom asset key of your Google live stream for [Google Pod Serving](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md#configure-your-channel), and with the DAI asset key for [Google DAI](https://optiview.dolby.com/docs/ads/integrations/google/dai.md#configure-your-channel).
* The OptiView Ads SDK in your app: [Web](https://optiview.dolby.com/docs/ads/player-integration/optiview-ads-sdk/web.md), [Android](https://optiview.dolby.com/docs/ads/player-integration/optiview-ads-sdk/android.md), [iOS](https://optiview.dolby.com/docs/ads/player-integration/optiview-ads-sdk/ios.md), or [React Native](https://optiview.dolby.com/docs/ads/player-integration/optiview-ads-sdk/react-native.md).

## Schedule a break

A Google break carries a [vendor asset](https://optiview.dolby.com/docs/ads/concepts/breaks.md#vendor-assets) with `vendor` set to `gam` and `vendorParameters.type` set to `pod`. Google performs the decisioning, so the asset needs no URI. The same break serves both delivery modes.

```bash
curl -X POST 'https://us.ads.optiview.dolby.com/api/v1/channels/<channel-id>/breaks' \
  -u "$ADS_API_KEY:$ADS_API_SECRET" \
  -H 'Content-Type: application/json' \
  -H 'X-Org-ID: <org-id>' \
  -d '{
    "start": "2026-07-16T12:15:00.000Z",
    "duration": 60,
    "variant": {
      "format": "single",
      "assets": [
        {
          "type": "vendor",
          "vendor": "gam",
          "vendorParameters": { "type": "pod" },
          "assetParameters": {
            "description_url": "https://www.example.com/sports/live.html",
            "plcmt": "1"
          }
        }
      ]
    }
  }'
```

* OptiView Ads announces the break to Google within the [look-forward time](https://optiview.dolby.com/docs/ads/integrations/google.md#look-forward-time) before its start, so Google can decision the pod in time.
* Create the break at least the [decisioning margin](https://optiview.dolby.com/docs/ads/integrations/google.md#decisioning-margin) before its start, or it is rejected.
* The break starts in the `PREPARING` state, and becomes `READY` once Google has decisioned it. See [How pod decisioning works](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md#how-pod-decisioning-works).

### Other ways to create the break

* **Punch it live.** Create the break without a `start`. Google decisions it ahead of time, and the break waits in the `CUED` state until you [punch](https://optiview.dolby.com/docs/ads/concepts/breaks.md#break-punching) it.
* **Detect it.** Add your stream as an [origin](https://optiview.dolby.com/docs/ads/concepts/origins.md) and configure a [marker rule](https://optiview.dolby.com/docs/ads/concepts/marker-detection.md) whose [template](https://optiview.dolby.com/docs/ads/concepts/templates.md) holds the Google vendor asset.

## What your app needs

The SDK reads the Google settings — your network code and the channel's Google asset key — from the channel's Break Manifest, and starts the Google stream session automatically when the session starts. You do not configure them in the app, so your app and the backend always agree on which Google stream the ads belong to.

| Platform     | Requirement                                                                                                                                                                                                                                      |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Web          | Load Google's IMA DAI SDK on the page, before your application script (see below).                                                                                                                                                               |
| Android      | Nothing extra: the SDK runtime includes the Google IMA SDK.                                                                                                                                                                                      |
| iOS and tvOS | Nothing extra: the runtime pod includes the Google IMA SDK. With Swift Package Manager, add the Google IMA packages as described in [iOS](https://optiview.dolby.com/docs/ads/player-integration/optiview-ads-sdk/ios.md#swift-package-manager). |
| React Native | Nothing extra: the native SDKs include the Google IMA SDK.                                                                                                                                                                                       |

On Web, add the IMA DAI loader to your page:

```html
<script src="https://imasdk.googleapis.com/js/sdkloader/ima3_dai.js"></script>
```

If your channel also has VAST breaks, load `ima3.js` as well; the two scripts work side by side.

### Server-side sessions

When the channel steers a device to SSAI, the SDK requests the stitched stream from Google and loads it into your content player instead of your original stream URL. Your app keeps the same integration and starts the session with the same Break Manifest URL. On Web, use a content player adapter that exposes its video element, such as the HLS.js, Shaka, or native video adapter. In a server-side session, the SDK still plays the [event-triggered breaks](https://optiview.dolby.com/docs/ads/concepts/breaks.md#event-based-triggers) — pre-roll, pause, and post-roll — on the device.

## Ad targeting parameters

For Google, `assetParameters` are sent as Google [ad tag parameters](https://support.google.com/admanager/answer/10678356) (`adTagParameters`). As a rule of thumb:

* Set the values that describe your content on the break, such as `description_url` and `plcmt`. See [Required Google parameters](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md#required-google-parameters).
* Set the values that depend on the playback environment in the SDK, such as `vpa` and `vpmute` and, in apps, the [device and app identity parameters](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md#additional-parameters-for-app-inventory).

When the same key is set in both places, the value on the break wins. See [Ad targeting parameters](https://optiview.dolby.com/docs/ads/how-to-guides/ad-tag-parameters.md) for the merge rules and platform examples.

## Troubleshooting

| Diagnostic               | What it means                                                                                   | What to do                                                                                    |
| ------------------------ | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| `DA-GAM-CONFIG-RESOLVED` | Informational: the Google stream session uses the network code and asset key in the diagnostic. | Check that they match your Google stream.                                                     |
| `DA-GAM-CONFIG-MISSING`  | The Break Manifest carries Google breaks but no usable Google configuration.                    | Check that the channel is connected to Google.                                                |
| `DA-GAM-SESSION-FAILED`  | The Google stream session could not be started.                                                 | On Web, load `ima3_dai.js` on the page. Otherwise, check the error message in the diagnostic. |

Breaks that fail in the backend, for example because Google could not decision them in time, end up in the `ERROR` state and never reach the SDK. See [Troubleshooting](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md#troubleshooting) on the Google Pod Serving integration page for the possible reasons.

## Related resources

| Resource                                                                                                 | Description                                                           |
| -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [Live](https://optiview.dolby.com/docs/ads/workflows/live.md)                                            | Live channels: timebase, break creation, and delivery modes.          |
| [Google Ad Manager](https://optiview.dolby.com/docs/ads/integrations/google.md)                          | Organization-level prerequisites: network code and service account.   |
| [Google Pod Serving integration](https://optiview.dolby.com/docs/ads/integrations/google/pod-serving.md) | Google Ad Manager setup, channel configuration, and pod breaks.       |
| [Google DAI integration](https://optiview.dolby.com/docs/ads/integrations/google/dai.md)                 | Server-side insertion: proxy, live stream, and channel configuration. |
| [Ad targeting parameters](https://optiview.dolby.com/docs/ads/how-to-guides/ad-tag-parameters.md)        | Passing ad tag parameters to Google.                                  |
| [Google Ad Manager on VOD](https://optiview.dolby.com/docs/ads/workflows/vod/google-ad-manager.md)       | The same workflow for on-demand assets.                               |
