包含定義和建立行銷活動物件關聯的方法。 如需產生器的相關資訊,請參閱 建立器。
範例使用方式:
// Gets the iterator that iterates all campaigns
// in the account.
var shoppingCampaign = AdsApp.shoppingCampaigns().withIds(["123456789"]).get();
// Loops through all campaigns in the account.
while (iterator.hasNext()) {
var campaign = iterator.next();
// Get the campaign audience's builder.
var operation = campaign.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 修飾詞。 |
傳回
傳回