Google 会使用 AI 技术将内容翻译成您偏好的语言。AI 翻译可能包含错误。
排除的展示位置列表
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
获取排除的展示位置列表中的所有展示位置
function getPlacementsFromExcludedPlacementList(name) {
const excludedPlacementListIterator =
AdsApp.excludedPlacementLists()
.withCondition(`shared_set.name = '${name}'`)
.get();
if (!excludedPlacementListIterator.hasNext()) {
throw new Error(`No excluded placement list with name '${name}' found.`);
}
const excludedPlacementList = excludedPlacementListIterator.next();
return excludedPlacementList.excludedPlacements().get();
}
将展示位置添加到排除的展示位置列表
function addPlacementToList(url, name) {
const excludedPlacementListIterator =
AdsApp.excludedPlacementLists()
.withCondition(`shared_set.name = '${name}'`)
.get();
if (!excludedPlacementListIterator.hasNext()) {
throw new Error(`No excluded placement list with name '${name}' found.`);
}
const excludedPlacementList = excludedPlacementListIterator.next();
excludedPlacementList.addExcludedPlacement(url);
}
[null,null,["最后更新时间 (UTC):2026-02-18。"],[],[]]