包含定義和建立廣告群組客群關聯的方法。 如需建置器的相關資訊,請參閱 建置器。
使用範例:
// 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 (物件 userList)
設定相關聯的使用者清單。
引數
| 名稱 |
類型 |
描述 |
| userList |
字串 |
相關聯的使用者清單。 |
withAudienceId (字串 audienceId)
設定相關聯客群的 ID。
引數
| 名稱 |
類型 |
描述 |
| audienceId |
字串 |
相關聯客群的 ID。 |
withAudienceType (字串 audienceType)
設定相關聯客群的類型。
引數
| 名稱 |
類型 |
描述 |
| audienceId |
字串 |
相關聯客群的類型。 |
withBidModifier (double 修飾詞)
設定關聯的出價調節係數。
引數
| 名稱 |
類型 |
描述 |
| 修飾詞 |
double |
協會的出價調節係數。 |
傳回
傳回