包含用于定义和创建广告组受众关联的方法。 有关生成器的信息,请参阅 生成器。
示例用法:
// 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`);
}
}
}
方法
build
创建广告组受众,并返回用于检查是否已成功添加广告组受众的操作对象。
返回
Exclude
从此广告组中排除指定的受众群体,并返回用于检查是否已成功添加排除的广告组受众的操作对象。
返回
withAudience (对象 userList)
设置关联的用户列表。
参数
| 名称 |
类型 |
说明 |
| userList |
string |
关联的用户列表。 |
withAudienceId (字符串 audienceId)
设置关联的受众 ID。
参数
| 名称 |
类型 |
说明 |
| audienceId |
string |
关联受众的 ID。 |
withAudienceType (字符串 audienceType)
设置关联的受众类型。
参数
| 名称 |
类型 |
说明 |
| audienceId |
string |
关联受众的类型。 |
withBidModifier (双修饰符)
设置关联的出价修饰符。
参数
| 名称 |
类型 |
说明 |
| 修饰符 |
double |
关联的出价修饰符。 |
返回
返回