Skip to content

google_ads_youtube_video_asset

A YouTube video asset points bidsmith at a video that is already published on your YouTube channel, addressed by its video id. It’s the creative you attach to a preroll / in-stream / bumper ad via a video_responsive_ad block.

apply creates the asset from that id and attaches it to the ad, so a video campaign runs end to end from your .bid files — the only manual step is getting the video onto YouTube. If the same video id is already an asset on the account, bidsmith reuses it instead of adding a duplicate.

Where the video id comes from

Open the video on YouTube. The id is the string after watch?v= in the URL:

https://www.youtube.com/watch?v=dQw4w9WgXcQ
└─────┬────┘
youtube_video_id

The video should be Public or Unlisted so Google Ads can serve it.

Example

resource "google_ads_youtube_video_asset" "brand_12s" {
youtube_video_id = "dQw4w9WgXcQ"
youtube_video_title = "Ghostery — Block Ads & Trackers (12s)"
}

youtube_video_title is optional and only for readability in your files; Google Ads uses the title from YouTube.

Schema

Required

  • youtube_video_id ( String )

Optional

  • youtube_video_title ( String )

See also