Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Contains the methods for defining and creating an ad group audience association. For information about builders, see Builders.
Example usage:
// Gets the iterator that iterates all ad groups
// in the account.
var iterator = AdsApp.adGroups().get();
// Loops through all ad groups in the account.
while (iterator.hasNext()) {
var adGroup = iterator.next();
// Get the ad group audience's builder.
var operation = adGroup.targeting().newUserListBuilder()
.withAudienceId("AUDIENCE ID GOES HERE")
.build();
// See the Builders topic for performance considerations
// when using the operation object's methods.
if (!operation.isSuccessful()) {
for (var error of operation.getErrors()) {
Logger.log(`${error}\n`);
}
}
}
Method Name | Return Type | Description |
---|---|---|
build | AdGroupAudienceOperation | Creates the ad group audience association and returns an operation object used to check whether the ad group audience association was successfully added. |
exclude | AdGroupExcludedAudienceOperation | Excludes the specified audience from this ad group and returns an operation object used to check whether the excluded ad group audience was successfully added. |
withAudience(Object userList) | AdGroupAudienceBuilder | Sets the associated user list. |
withAudienceId(string audienceId) | AdGroupAudienceBuilder | Sets the associated audience's ID. |
withAudienceType(string audienceType) | AdGroupAudienceBuilder | Sets the associated audience's type. |
withBidModifier(double modifier) | AdGroupAudienceBuilder | Sets the association's bid modifier. |
Creates the ad group audience and returns an operation object used to check whether the ad group audience was successfully added.
Type | Description |
---|---|
AdGroupAudienceOperation | An operation object used to check whether the ad group audience was successfully added. |
Excludes the specified audience from this ad group and returns an operation object used to check whether the excluded ad group audience was successfully added.
Type | Description |
---|---|
AdGroupExcludedAudienceOperation | An operation object used to check whether the excluded ad group audience was successfully added. |
Sets the associated user list.
Name | Type | Description |
---|---|---|
userList | string | The associated user list. |
Sets the associated audience's ID.
Name | Type | Description |
---|---|---|
audienceId | string | The ID of the associated audience. |
Sets the associated audience's type.
Name | Type | Description |
---|---|---|
audienceId | string | The associated audience's type. |
Sets the association's bid modifier.
Name | Type | Description |
---|---|---|
modifier | double | The association's bid modifier. |
Type | Description |
---|---|
AdGroupAudienceBuilder | The ad group audience builder with the bid modifier applied. |
Type | Description |
---|---|
AdGroupAudienceBuilder | The ad group audience builder with the name applied. |