AdsApp.ShoppingAdGroupTargeting
Stay organized with collections
Save and categorize content based on your preferences.
Access to ad group-level targeting criteria.
For instance, to select all audiences targeted by an ad group you might
use:
var adgroup = AdsApp.shoppingAdGroups().get().next();
var audiences = adgroup.targeting().audiences().get();
while (audiences.hasNext()) {
var audience = audiences.next();
}
Methods:
audiences()
Specializes this selector to return
ShoppingAdGroupAudience
criteria.
Return values:
getTargetingSetting(criterionTypeGroup)
Returns the current targeting setting of the specified criterion type group
for this shopping ad group.
Currently the only supported criterion type group value is
USER_INTEREST_AND_LIST.
The returned setting will be either 'TARGET_ALL_TRUE' or
'TARGET_ALL_FALSE', corresponding to 'Bid only' and 'Target and bid',
respectively.
Arguments:
Name | Type | Description |
criterionTypeGroup |
String |
The criterion type group to check. |
Return values:
Type | Description |
String |
The targeting setting for the criterion type group, either
'TARGET_ALL_TRUE' or 'TARGET_ALL_FALSE'. |
newUserListBuilder()
Returns a new user list audience builder for this ad group. When
ShoppingAdGroupAudienceBuilder.build()
is called, an audience will be added in this ad group.
Return values:
setTargetingSetting(criterionTypeGroup, targetingSetting)
Sets the targeting setting for this ad group.
Currently the targeting setting may be set for the
USER_INTEREST_AND_LIST criterion type group only.
Returns nothing.
Arguments:
Name | Type | Description |
criterionTypeGroup |
String |
The criterion type group to receive the new
setting. |
targetingSetting |
String |
The new targeting setting, either 'TARGET_ALL_TRUE'
or 'TARGET_ALL_FALSE'. |
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."],[[["Access and manage targeting criteria for Shopping ad groups within Google Ads."],["Utilize the provided methods to retrieve, add, and modify audience targeting settings."],["Leverage the `targetingSetting` property to control bid-only or target-and-bid strategies for user lists and interests."],["Script examples demonstrate how to interact with ad group targeting using the Google Ads Scripts API."]]],[]]