Negatif Anahtar Kelimeler
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bir kampanyaya negatif anahtar kelime ekleme
function addNegativeKeywordToCampaign(keyword, campaignName) {
const campaignIterator = AdsApp.campaigns()
.withCondition(`campaign.name = "${campaignName}"`)
.get();
if (campaignIterator.hasNext()) {
const campaign = campaignIterator.next();
campaign.createNegativeKeyword(keyword);
} else {
throw new Error(`Cannot find campaign with the name '${campaignName}'`);
}
}
Bir kampanyadaki negatif anahtar kelimeleri alma
function getNegativeKeywordsForCampaign(campaignName) {
const campaignIterator = AdsApp.campaigns()
.withCondition(`campaign.name = "${campaignName}"`)
.get();
if (campaignIterator.hasNext()) {
const campaign = campaignIterator.next();
const negativeKeywordIterator = campaign.negativeKeywords().get();
console.log(`Found ${negativeKeywordIterator.totalNumEntities()} negative keywords.`);
return negativeKeywordIterator;
} else {
throw new Error(`Cannot find campaign with the name '${campaignName}'`);
}
}
Bir reklam grubuna negatif anahtar kelime ekleme
function addNegativeKeywordToAdGroup(keyword, adGroupName) {
const adGroupIterator = AdsApp.adGroups()
.withCondition(`ad_group.name = "${adGroupName}"`)
.get();
if (!adGroupIterator.hasNext()) {
throw new Error(`Cannot find ad group with the name '${adGroupName}'`);
}
if (adGroupIterator.totalNumEntities() > 1) {
console.warn(`Found more than one ad group named '${adGroupName}', using the first one.`);
}
const adGroup = adGroupIterator.next();
adGroup.createNegativeKeyword(keyword);
}
Bir reklam grubundaki negatif anahtar kelimeleri alma
function getNegativeKeywordsForAdGroup(adGroupName) {
const adGroupIterator = AdsApp.adGroups()
.withCondition(`ad_group.name = "${adGroupName}"`)
.get();
if (!adGroupIterator.hasNext()) {
throw new Error(`Cannot find ad group with the name '${adGroupName}'`);
}
if (adGroupIterator.totalNumEntities() > 1) {
console.warn(`Found more than one ad group named '${adGroupName}', using the first one.`);
}
const adGroup = adGroupIterator.next();
const negativeKeywordIterator = adGroup.negativeKeywords().get();
if (negativeKeywordIterator.hasNext()) {
const negativeKeyword = negativeKeywordIterator.next();
console.log(`Found ${negativeKeywordIterator.totalNumEntities()} negative keywords.`);
return negativeKeywordIterator;
}
}
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-09-12 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"İhtiyacım olan bilgiler yok"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Çok karmaşık / çok fazla adım var"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Güncel değil"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Çeviri sorunu"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Örnek veya kod sorunu"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Diğer"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Anlaması kolay"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Sorunumu çözdü"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Diğer"
}]
{"lastModified": "Son g\u00fcncelleme tarihi: 2024-09-12 UTC."}
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2024-09-12 UTC."]]