AdsApp.AdGroupTargeting
Stay organized with collections
Save and categorize content based on your preferences.
Provides access to ad group-level targeting criteria: audiences.
Methods:
audiences()
Specializes this selector to return
SearchAdGroupAudience
criteria.
Return values:
excludedAudiences()
Specializes this selector to return
SearchAdGroupExcludedAudience
criteria.
Return values:
getTargetingSetting(criterionTypeGroup)
Returns the current targeting setting of the specified criterion type group
for this 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 builder for this ad group. When
SearchAdGroupAudienceBuilder.build()
is called, an audience will be added in this ad group. When
SearchAdGroupAudienceBuilder.exclude()
is called, an excluded 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-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eProvides access to ad group-level targeting criteria, specifically audiences and excluded audiences, allowing for refined campaign reach.\u003c/p\u003e\n"],["\u003cp\u003eEnables management of targeting settings for user interest and list criterion type groups, controlling how ads are served to specific audiences.\u003c/p\u003e\n"],["\u003cp\u003eOffers a builder to create and manage new user lists within the ad group, facilitating custom audience targeting strategies.\u003c/p\u003e\n"],["\u003cp\u003eIncludes methods to retrieve and adjust targeting settings, ensuring ads are shown to the desired audience segments with optimal bidding strategies.\u003c/p\u003e\n"],["\u003cp\u003eGrants access to both audiences and excluded audiences via dedicated selectors, providing flexibility in audience management for campaigns.\u003c/p\u003e\n"]]],[],null,["# AdsApp.AdGroupTargeting\n\nProvides access to ad group-level targeting criteria: audiences.\n\n### Methods:\n\n| Member | Type | Description |\n|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [audiences()](#audiences) | [AdsApp.SearchAdGroupAudienceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudienceselector) | Specializes this selector to return [SearchAdGroupAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudience) criteria. |\n| [excludedAudiences()](#excludedAudiences) | [AdsApp.SearchAdGroupExcludedAudienceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupexcludedaudienceselector) | Specializes this selector to return [SearchAdGroupExcludedAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupexcludedaudience) criteria. |\n| [getTargetingSetting(criterionTypeGroup)](#getTargetingSetting_criterionTypeGroup) | `String` | Returns the current targeting setting of the specified criterion type group for this ad group. |\n| [newUserListBuilder()](#newUserListBuilder) | [AdsApp.SearchAdGroupAudienceBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudiencebuilder) | Returns a new user list builder for this ad group. |\n| [setTargetingSetting(criterionTypeGroup, targetingSetting)](#setTargetingSetting_criterionTypeGroup-targetingSetting) | `void` | Sets the targeting setting for this ad group. |\n\n`audiences()`\n-------------\n\nSpecializes this selector to return [SearchAdGroupAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudience) criteria.\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [AdsApp.SearchAdGroupAudienceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudienceselector) | A selector for [SearchAdGroupAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudience) criteria. |\n\n`excludedAudiences()`\n---------------------\n\nSpecializes this selector to return [SearchAdGroupExcludedAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupexcludedaudience) criteria.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|\n| [AdsApp.SearchAdGroupExcludedAudienceSelector](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupexcludedaudienceselector) | A selector for [SearchAdGroupExcludedAudience](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupexcludedaudience) criteria. |\n\n`getTargetingSetting(criterionTypeGroup)`\n-----------------------------------------\n\nReturns the current targeting setting of the specified criterion type group for this ad group.\n\nCurrently the only supported criterion type group value is\n'USER_INTEREST_AND_LIST'.\n\nThe returned setting will be either 'TARGET_ALL_TRUE' or\n'TARGET_ALL_FALSE', corresponding to 'Bid only' and 'Target and bid',\nrespectively.\n\n### Arguments:\n\n| Name | Type | Description |\n|--------------------|----------|------------------------------------|\n| criterionTypeGroup | `String` | The criterion type group to check. |\n\n### Return values:\n\n| Type | Description |\n|----------|-----------------------------------------------------------------------------------------------------|\n| `String` | The targeting setting for the criterion type group, either 'TARGET_ALL_TRUE' or 'TARGET_ALL_FALSE'. |\n\n`newUserListBuilder()`\n----------------------\n\nReturns a new user list builder for this ad group. When [SearchAdGroupAudienceBuilder.build()](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudiencebuilder#build) is called, an audience will be added in this ad group. When [SearchAdGroupAudienceBuilder.exclude()](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudiencebuilder#exclude) is called, an excluded audience will be added in this ad group.\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| [AdsApp.SearchAdGroupAudienceBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_searchadgroupaudiencebuilder) | The builder used to add or exclude an audience in the ad group. |\n\n`setTargetingSetting(criterionTypeGroup, targetingSetting)`\n-----------------------------------------------------------\n\nSets the targeting setting for this ad group.\n\nCurrently the targeting setting may be set for the\n`USER_INTEREST_AND_LIST` criterion type group only.\n\nReturns nothing.\n\n### Arguments:\n\n| Name | Type | Description |\n|--------------------|----------|----------------------------------------------------------------------------|\n| criterionTypeGroup | `String` | The criterion type group to receive the new setting. |\n| targetingSetting | `String` | The new targeting setting, either 'TARGET_ALL_TRUE' or 'TARGET_ALL_FALSE'. |"]]