AdsApp.ShoppingAdGroupBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for a shopping ad group under construction.
Typical usage:
var shoppingAdGroupBuilder = campaign.newAdGroupBuilder();
var shoppingAdGroupOperation = shoppingAdGroupBuilder
.withName("shopping ad group name")
.withStatus("PAUSED")
.build();
var shoppingAdGroup = shoppingAdGroupOperation.getResult();
Methods:
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:
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:
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:
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:
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-01-28 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-01-28 UTC."],[[["The ShoppingAdGroupBuilder facilitates the creation and configuration of new shopping ad groups within Google Ads campaigns."],["Key properties like name, status (e.g., \"PAUSED\", \"ENABLED\"), and maximum CPC bid can be set using dedicated methods."],["The `build()` method finalizes the ad group configuration and returns a ShoppingAdGroupOperation for accessing the created ad group."],["If the ad group name is not explicitly set using `withName()`, a default name will be assigned."],["Similarly, the ad group status defaults to `ENABLED` if not specified using `withStatus()`."]]],[]]