Use ad break parameters

The Ad Break API lets you set the ad tag parameters using ad break parameters, which enhances ad targeting accuracy and integration with ad servers.

Override ad tag parameters

To override the ad tag parameters of the Google DAI stream, set the breakParams.adTagParams field of the ad break. For more information, see Supply targeting parameters to your stream and All VAST ad tag parameters.

The following example shows a DAI stream's ad tag containing the mridx (mid-roll number) query parameter:

https://pubads.g.doubleclick.net/gampad/live/ads?mridx=3&…

The following example request creates an ad break that overrides the mridx targeting value:

curl -X POST "https://admanagervideo.googleapis.com/v1/adBreak/networks/NETWORK_CODE/assets/ASSET_KEY/adBreaks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer OAUTH_TOKEN" \
  -d '{
    "expectedDuration": "30s",
    "expectedStartTime": "2025-06-03T15:00:00Z",
    "scte35CueOut": "/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==",
    "customParams": "param1=value1&param2=value2",
    "podTemplateName": "podtemplate",
    "breakParams": {
      "adTagParams": [{"key": "mridx", "value": "7"}]
    }
  }'

Replace the following:

Expand ad tag with DAI macros

Google DAI supports ad tag macros in the %%DAI_PATTERN:MACRO_NAME%% format. The macro name must be in UPPER_CASE format, containing uppercase letters, numbers, and underscores only.

You can insert these macros in the Google DAI stream's ad tag or the DAI stream request to set the macros with the values in your breakParams.macros field.

The following example shows a Google DAI stream's ad tag containing a BREAK_TYPE macro:

https://pubads.g.doubleclick.net/gampad/live/ads?iu=/21775744923/external/single_ad_samples/%%DAI_PATTERN:BREAK_TYPE%%&…

The following request updates an ad break and sets the BREAK_TYPE macro value:

curl -X PATCH 'https://admanagervideo.googleapis.com/v1/adBreak/networks/NETWORK_CODE/assets/ASSET_KEY/adBreaks/AD_BREAK_ID' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer OAUTH_TOKEN' \
  -d '{
  "name": "networks/…/assets/…/adBreaks/bcc402a6-9880-4b8b-8e4a-a8cd3688f854",
  "expectedDuration": "30s",
  "expectedStartTime": "2025-06-03T15:10:00Z",
  "scte35CueOut": "/DA0AAAAAAAA///wBQb+cr0AUAAeAhxDVUVJSAAAjn/PAAGlmbAICAAAAAAsoKGKNAIAmsnRfg==",
  "customParams": "param1=value1&param2=value2",
  "podTemplateName": "podtemplate"
  "breakState": "BREAK_STATE_SCHEDULED",
  "breakParams": {
    "macros": [{"key": "BREAK_TYPE", "value": "national"}]
  }
}'

Replace AD_BREAK_ID with your ad break ID.

Google DAI resolve the ad tag with the macro as follows:

https://pubads.g.doubleclick.net/gampad/live/ads?iu=/21775744923/external/single_ad_samples/national&…

Expand ad tag with SCTE-35 macros

When setting up your Google DAI livestream event, you can place SCTE-35 macros in the master ad tag.

When the livestream event starts, you can insert SCTE-35 data in the content manifest or call DAI Ad Break API with the SCTE-35 data included in the scte35CueOut parameter. Google DAI uses the decoded data to populate the SCTE-35 macros in the ad tag.

The following example uses %%TIME_SIGNAL_UPID_RAW%% macro:

https://pubads.g.doubleclick.net/gampad/live/ads?iu=/21775744923/external/single_ad_samples/%%TIME_SIGNAL_UPID_RAW%%&…

The following example uses JSON to illustrate a SCTE-35 timed signal data:

{
  "splice_info_section": {
    
    "splice_command": {
      "command_name": "time_signal",
      "splice_time": {
        "time_specified_flag": 1,
        "pts_time": "123456789"
      }
    },
    "splice_descriptors": [
      {
        
        "segmentation_upid": {
          "raw_hex": "0x6E6174696F6E616C", // UTF8 value: national
          
        }
      }
    ]
  }
}

Google DAI resolve the ad tag with the SCTE-35 macro as follows:

https://pubads.g.doubleclick.net/gampad/live/ads?iu=/21775744923/external/single_ad_samples/national&…