Page Summary
-
VideoAdGroupBuilder is used to construct a video ad group.
-
The
build()method creates the VideoAdGroup and returns an operation object to access results or errors. -
Several methods like
withName(),withStatus(),withAdGroupType(),withCpa(),withCpm(),withCpv(), andwithTargetCpm()are available to configure the video ad group. -
The
withAdGroupType()method is required to set the type of the ad group. -
Default values are applied for name, status, and various bid types if they are not explicitly set using the corresponding
withmethods.
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:
| Member | Type | Description |
|---|---|---|
AdsApp.VideoAdGroupOperation
|
Creates a VideoAdGroup . | |
AdsApp.VideoAdGroupBuilder
|
Sets the video ad group type. | |
AdsApp.VideoAdGroupBuilder
|
Sets the Target CPA bid of the new video ad group to the specified value. | |
AdsApp.VideoAdGroupBuilder
|
Sets the CPM bid of the new video ad group to the specified value. | |
AdsApp.VideoAdGroupBuilder
|
Sets the max CPV bid of the new video ad group to the specified value. | |
AdsApp.VideoAdGroupBuilder
|
Sets the name of the new ad group to the specified value. | |
AdsApp.VideoAdGroupBuilder
|
Sets the status of the new ad group to the specified value. | |
AdsApp.VideoAdGroupBuilder
|
Sets the Target CPM bid of the new video ad group to the specified value. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupOperation
|
The associated ad group operation. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
Ad group builder with the specified ad group type. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
The video ad group builder with the specified Target CPA. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
The video ad group builder with the specified CPM. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
The video ad group builder with the specified max CPV. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
Ad group builder with the specified name. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
Ad group builder with the specified status. |
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:
| Type | Description |
|---|---|
AdsApp.VideoAdGroupBuilder
|
The video ad group builder with the specified Target CPM. |

