AI-generated Key Takeaways
-
The content provides access to ad group-level targeting criteria for audiences.
-
Methods are available to specialize selectors for returning both included and excluded audience criteria.
-
You can retrieve and set the current targeting setting for specified criterion type groups within an ad group.
-
A user list builder is provided to add or exclude audiences in the ad group.
Methods:
| Member | Type | Description |
|---|---|---|
| audiences() | AdsApp.SearchAdGroupAudienceSelector |
Specializes this selector to return SearchAdGroupAudience criteria. |
| excludedAudiences() | AdsApp.SearchAdGroupExcludedAudienceSelector |
Specializes this selector to return SearchAdGroupExcludedAudience criteria. |
| getTargetingSetting(criterionTypeGroup) | String |
Returns the current targeting setting of the specified criterion type group for this ad group. |
| newUserListBuilder() | AdsApp.SearchAdGroupAudienceBuilder |
Returns a new user list builder for this ad group. |
| setTargetingSetting(criterionTypeGroup, targetingSetting) | void |
Sets the targeting setting for this ad group. |
audiences()
Specializes this selector to return SearchAdGroupAudience
criteria. Return values:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceSelector |
A selector for SearchAdGroupAudience criteria. |
excludedAudiences()
Specializes this selector to return SearchAdGroupExcludedAudience
criteria. Return values:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupExcludedAudienceSelector |
A selector for SearchAdGroupExcludedAudience criteria. |
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:
| Type | Description |
|---|---|
AdsApp.SearchAdGroupAudienceBuilder |
The builder used to add or exclude an audience in the ad group. |
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'. |