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`);
}
}
}
Creates the ad group audience association and returns an operation object used to check whether the ad group audience association 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.
An operation object used to check whether the ad group audience was successfully added.
exclude
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.