AdsApp.VideoPlacementBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
VideoPlacement objects.
Example usage:
var videoPlacementBuilder = videoAdGroup
.videoTargeting()
.newPlacementBuilder();
var videoPlacementOperation = videoPlacementBuilder
.withUrl('"http://www.site.com"') // required
.build(); // create the placement
Methods:
build()
Builds the video placement. Returns a
VideoPlacementOperation that corresponds to the creation of the
VideoPlacement.
Return values:
exclude()
Builds the excluded video placement. Returns an
ExcludedVideoPlacementOperation that corresponds to the creation of the
ExcludedVideoPlacement.
Return values:
withUrl(url)
Sets the URL of the placement. This field is required.
Arguments:
Name | Type | Description |
url |
String |
The placement URL. |
Return values:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThis builder facilitates the creation and management of video placements within Google Ads campaigns.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to define placement URLs and build or exclude placements using operations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithUrl()\u003c/code\u003e method is mandatory for setting the video placement URL.\u003c/p\u003e\n"],["\u003cp\u003eUpon building, it returns a \u003ccode\u003eVideoPlacementOperation\u003c/code\u003e or \u003ccode\u003eExcludedVideoPlacementOperation\u003c/code\u003e object for further campaign integration.\u003c/p\u003e\n"]]],[],null,["# AdsApp.VideoPlacementBuilder\n\nBuilder for [VideoPlacement](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacement) objects.\n\nExample usage:\n\n```gdscript\nvar videoPlacementBuilder = videoAdGroup\n .videoTargeting()\n .newPlacementBuilder();\nvar videoPlacementOperation = videoPlacementBuilder\n .withUrl('\"http://www.site.com\"') // required\n .build(); // create the placement\n```\n\n### Methods:\n\n| Member | Type | Description |\n|------------------------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------|\n| [build()](#build) | [AdsApp.VideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacementoperation) | Builds the video placement. |\n| [exclude()](#exclude) | [AdsApp.ExcludedVideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoplacementoperation) | Builds the excluded video placement. |\n| [withUrl(url)](#withUrl_url) | [AdsApp.VideoPlacementBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacementbuilder) | Sets the URL of the placement. |\n\n`build()`\n---------\n\nBuilds the video placement. Returns a [VideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacementoperation) that corresponds to the creation of the [VideoPlacement](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacement).\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------|------------------------------|\n| [AdsApp.VideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacementoperation) | The VideoPlacementOperation. |\n\n`exclude()`\n-----------\n\nBuilds the excluded video placement. Returns an [ExcludedVideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoplacementoperation) that corresponds to the creation of the [ExcludedVideoPlacement](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoplacement).\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------|\n| [AdsApp.ExcludedVideoPlacementOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoplacementoperation) | The ExcludedVideoPlacementOperation. |\n\n`withUrl(url)`\n--------------\n\nSets the URL of the placement. This field is required.\n\n### Arguments:\n\n| Name | Type | Description |\n|------|----------|--------------------|\n| url | `String` | The placement URL. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------|-------------------------------------------------|\n| [AdsApp.VideoPlacementBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoplacementbuilder) | A VideoPlacementBuilder with the specified URL. |"]]