AdsApp.VideoAdGroupBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for a video ad group under construction.
Typical usage:
var videoAdGroupBuilder = videoCampaign.newVideoAdGroupBuilder();
var videoAdGroupOperation = videoAdGroupBuilder
.withName("ad group name")
.withStatus("PAUSED")
.withAdGroupType("VIDEO_TRUE_VIEW_IN_STREAM")
.build();
var videoAdGroup = videoAdGroupOperation.getResult();
Methods:
build()
Creates a
VideoAdGroup. Returns an
VideoAdGroupOperation that
can be used to get the new ad group (or access any associated errors if
creation failed).
Return values:
withAdGroupType(adGroupType)
Sets the video ad group type. Possible values:
VIDEO_BUMPER, VIDEO_EFFICIENT_REACH,
VIDEO_NON_SKIPPABLE_IN_STREAM, VIDEO_RESPONSIVE,
VIDEO_TRUE_VIEW_IN_DISPLAY, VIDEO_TRUE_VIEW_IN_STREAM,
YOUTUBE_AUDIO
.
This field is required.
Arguments:
Name | Type | Description |
adGroupType |
String |
The type of the ad group. |
Return values:
withCpa(cpa)
Sets the Target CPA bid of the new video ad group to the specified
value.
If the bid is not set, the ad group will use the campaign's default
target CPA bid.
Arguments:
Name | Type | Description |
cpa |
double |
The Target CPA bid of the video ad group. |
Return values:
withCpm(cpm)
Sets the CPM bid of the new video ad group to the specified value.
See Cost-per-thousand
impressions (CPM) for more information.
If the bid is not set, the ad group will assume a default max CPM bid of
$0.01.
Arguments:
Name | Type | Description |
cpm |
double |
The CPM bid of the video ad group. |
Return values:
withCpv(cpv)
Sets the max CPV bid of the new video ad group to the specified value.
If the bid is not set, the ad group will assume a default max CPV bid of
$0.01.
Arguments:
Name | Type | Description |
cpv |
double |
The max CPV bid of the video ad group. |
Return values:
withName(name)
Sets the name of the new ad group to the specified value. If ad group name
is not set, the ad group will assume a default name ('Ad Group #5').
Arguments:
Name | Type | Description |
name |
String |
Ad group name. |
Return values:
withStatus(status)
Sets the status of the new ad group to the specified value. If the status
is not set, it will default to
ENABLED
.
Arguments:
Name | Type | Description |
status |
String |
Ad group status. |
Return values:
withTargetCpm(targetCpm)
Sets the Target CPM bid of the new video ad group to the specified
value.
If the bid is not set, the ad group will assume a default CPM bid of
$0.01.
Arguments:
Name | Type | Description |
targetCpm |
double |
The Target CPM bid of the video ad group. |
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-09-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eVideoAdGroupBuilder\u003c/code\u003e helps create new video ad groups within a video campaign, enabling customization of settings like name, status, and bidding strategy.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to define the ad group type (\u003ccode\u003eTRUE_VIEW_IN_STREAM\u003c/code\u003e, \u003ccode\u003eTRUE_VIEW_IN_DISPLAY\u003c/code\u003e, etc.), set bids (CPA, CPM, CPV), and assign a name and status.\u003c/p\u003e\n"],["\u003cp\u003eUsing the \u003ccode\u003ebuild()\u003c/code\u003e method, the builder generates a \u003ccode\u003eVideoAdGroupOperation\u003c/code\u003e to retrieve the created ad group or handle potential errors.\u003c/p\u003e\n"],["\u003cp\u003eIf settings like name or bids are not explicitly defined, the builder applies default values, ensuring a functional ad group is created.\u003c/p\u003e\n"]]],[],null,["Builder for a video ad group under construction.\n\nTypical usage:\n\n```gdscript\nvar videoAdGroupBuilder = videoCampaign.newVideoAdGroupBuilder();\nvar videoAdGroupOperation = videoAdGroupBuilder\n .withName(\"ad group name\")\n .withStatus(\"PAUSED\")\n .withAdGroupType(\"VIDEO_TRUE_VIEW_IN_STREAM\")\n .build();\nvar videoAdGroup = videoAdGroupOperation.getResult();\n```\n\nMethods:\n\n| Member | Type | Description |\n|--------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [build()](#build) | [AdsApp.VideoAdGroupOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupoperation) | Creates a [VideoAdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroup). |\n| [withAdGroupType(adGroupType)](#withAdGroupType_adGroupType) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the video ad group type. |\n| [withCpa(cpa)](#withCpa_cpa) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the Target CPA bid of the new video ad group to the specified value. |\n| [withCpm(cpm)](#withCpm_cpm) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the CPM bid of the new video ad group to the specified value. |\n| [withCpv(cpv)](#withCpv_cpv) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the max CPV bid of the new video ad group to the specified value. |\n| [withName(name)](#withName_name) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the name of the new ad group to the specified value. |\n| [withStatus(status)](#withStatus_status) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the status of the new ad group to the specified value. |\n| [withTargetCpm(targetCpm)](#withTargetCpm_targetCpm) | [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Sets the Target CPM bid of the new video ad group to the specified value. |\n\n`build()` Creates a [VideoAdGroup](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroup). Returns an [VideoAdGroupOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupoperation) that can be used to get the new ad group (or access any associated errors if creation failed).\n\nReturn values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------|------------------------------------|\n| [AdsApp.VideoAdGroupOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupoperation) | The associated ad group operation. |\n\n`withAdGroupType(adGroupType)` Sets the video ad group type. Possible values:\n\n`VIDEO_BUMPER, VIDEO_EFFICIENT_REACH,\nVIDEO_NON_SKIPPABLE_IN_STREAM, VIDEO_RESPONSIVE,\nVIDEO_TRUE_VIEW_IN_DISPLAY, VIDEO_TRUE_VIEW_IN_STREAM,\nYOUTUBE_AUDIO`.\n\nThis field is required.\n\nArguments:\n\n| Name | Type | Description |\n|-------------|----------|---------------------------|\n| adGroupType | `String` | The type of the ad group. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Ad group builder with the specified ad group type. |\n\n`withCpa(cpa)` Sets the Target CPA bid of the new video ad group to the specified value.\n\nIf the bid is not set, the ad group will use the campaign's default\ntarget CPA bid.\n\nArguments:\n\n| Name | Type | Description |\n|------|----------|-------------------------------------------|\n| cpa | `double` | The Target CPA bid of the video ad group. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | The video ad group builder with the specified Target CPA. |\n\n`withCpm(cpm)` Sets the CPM bid of the new video ad group to the specified value.\n\nSee [Cost-per-thousand\nimpressions (CPM)](//support.google.com/google-ads/answer/6310) for more information.\n\nIf the bid is not set, the ad group will assume a default max CPM bid of\n$0.01.\n\nArguments:\n\n| Name | Type | Description |\n|------|----------|------------------------------------|\n| cpm | `double` | The CPM bid of the video ad group. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | The video ad group builder with the specified CPM. |\n\n`withCpv(cpv)` Sets the max CPV bid of the new video ad group to the specified value.\n\nIf the bid is not set, the ad group will assume a default max CPV bid of\n$0.01.\n\nArguments:\n\n| Name | Type | Description |\n|------|----------|----------------------------------------|\n| cpv | `double` | The max CPV bid of the video ad group. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|--------------------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | The video ad group builder with the specified max CPV. |\n\n`withName(name)` Sets the name of the new ad group to the specified value. If ad group name is not set, the ad group will assume a default name ('Ad Group #5').\n\nArguments:\n\n| Name | Type | Description |\n|------|----------|----------------|\n| name | `String` | Ad group name. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|-------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Ad group builder with the specified name. |\n\n`withStatus(status)` Sets the status of the new ad group to the specified value. If the status is not set, it will default to `ENABLED`.\n\nArguments:\n\n| Name | Type | Description |\n|--------|----------|------------------|\n| status | `String` | Ad group status. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|---------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | Ad group builder with the specified status. |\n\n`withTargetCpm(targetCpm)` Sets the Target CPM bid of the new video ad group to the specified value.\n\nIf the bid is not set, the ad group will assume a default CPM bid of\n$0.01.\n\nArguments:\n\n| Name | Type | Description |\n|-----------|----------|-------------------------------------------|\n| targetCpm | `double` | The Target CPM bid of the video ad group. |\n\nReturn values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------|-----------------------------------------------------------|\n| [AdsApp.VideoAdGroupBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadgroupbuilder) | The video ad group builder with the specified Target CPM. |"]]