Page Summary
-
A Shopping Ad Group Builder is used to construct a shopping ad group.
-
The build() method creates the ShoppingAdGroup and returns an operation to access the result or any errors.
-
Methods like withCpc(), withName(), and withStatus() allow setting specific properties of the shopping ad group being built.
-
If the name is not set, a default name is used, and if the status is not set, it defaults to ENABLED.
Typical usage:
var shoppingAdGroupBuilder = campaign . newAdGroupBuilder (); var shoppingAdGroupOperation = shoppingAdGroupBuilder . withName ( "shopping ad group name" ) . withStatus ( "PAUSED" ) . build (); var shoppingAdGroup = shoppingAdGroupOperation . getResult ();
Methods:
| Member | Type | Description |
|---|---|---|
AdsApp.ShoppingAdGroupOperation
|
Creates a ShoppingAdGroup . | |
AdsApp.ShoppingAdGroupBuilder
|
Sets the max CPC bid of the new shopping ad group to the specified value. | |
AdsApp.ShoppingAdGroupBuilder
|
Sets the name of the new shopping ad group to the specified value. | |
AdsApp.ShoppingAdGroupBuilder
|
Sets the status of the new shopping ad group to the specified value. |
build()
Creates a ShoppingAdGroup
.
Returns a ShoppingAdGroupOperation
that can be used to get the new shopping ad group (or access any associated
errors if creation failed). Return values:
| Type | Description |
|---|---|
AdsApp.ShoppingAdGroupOperation
|
The associated shopping ad group operation. |
withCpc(cpc)
Sets the max CPC bid of the new shopping ad group to the specified value. Arguments:
| Name | Type | Description |
|---|---|---|
|
cpc
|
double
|
The max CPC bid of the shopping ad group. |
Return values:
| Type | Description |
|---|---|
AdsApp.ShoppingAdGroupBuilder
|
The shopping ad group builder with the specified max CPC. |
withName(name)
Sets the name of the new shopping ad group to the specified value. If ad
group name is not set, the shopping ad group will assume a default name
('Ad Group #5'). Arguments:
| Name | Type | Description |
|---|---|---|
|
name
|
String
|
Shopping ad group name. |
Return values:
| Type | Description |
|---|---|
AdsApp.ShoppingAdGroupBuilder
|
Shopping ad group builder with the specified name. |
withStatus(status)
Sets the status of the new shopping 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.ShoppingAdGroupBuilder
|
Shopping ad group builder with the specified status. |

