包含定義和建立廣告群組物件關聯的方法。 如需產生器的相關資訊,請參閱 建立器。
範例使用方式:
// 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`);
}
}
}
方法
建立
建立廣告群組物件,並傳回用來檢查是否已成功新增廣告群組物件的工作物件。
傳回
排除
從這個廣告群組排除指定的物件,並傳回工作物件,用來檢查是否已成功新增排除的廣告群組物件。
傳回
withAudience (Object userList)
設定相關聯的使用者清單。
引數
| 名稱 |
類型 |
說明 |
| userList |
字串 |
相關聯的使用者清單。 |
withAudienceId (字串 audienceId)
設定相關聯物件的識別碼。
引數
| 名稱 |
類型 |
說明 |
| audienceId |
字串 |
相關聯物件的識別碼。 |
withAudienceType (字串 audienceType)
設定相關聯物件的類型。
引數
| 名稱 |
類型 |
說明 |
| audienceId |
字串 |
相關聯物件的類型。 |
withBidModifier (double 修飾詞)
設定關聯的 bid 修飾詞。
引數
| 名稱 |
類型 |
說明 |
| 改 性 劑 |
double |
關聯的 bid 修飾詞。 |
傳回
傳回