کلمات کلیدی منفی
با مجموعهها، منظم بمانید
ذخیره و دستهبندی محتوا براساس اولویتهای شما.
کلمه کلیدی منفی را به کمپین اضافه کنید
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}'`);
}
}
کلمات کلیدی منفی را در کمپین دریافت کنید
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}'`);
}
}
یک کلمه کلیدی منفی به یک گروه تبلیغاتی اضافه کنید
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);
}
کلمات کلیدی منفی را در یک گروه تبلیغاتی دریافت کنید
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;
}
}
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-09-09 بهوقت ساعت هماهنگ جهانی.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"اطلاعاتی که نیاز دارم وجود ندارد"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"بیشازحد پیچیده/ مراحل بسیار زیاد"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"قدیمی"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"مشکل ترجمه"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشکل کد / نمونهها"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"غیره"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"درک آسان"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"مشکلم را برطرف کرد"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"غیره"
}]
{"lastModified": "\u062a\u0627\u0631\u06cc\u062e \u0622\u062e\u0631\u06cc\u0646 \u0628\u0647\u200c\u0631\u0648\u0632\u0631\u0633\u0627\u0646\u06cc 2024-09-09 \u0628\u0647\u200c\u0648\u0642\u062a \u0633\u0627\u0639\u062a \u0647\u0645\u0627\u0647\u0646\u06af \u062c\u0647\u0627\u0646\u06cc."}
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2024-09-09 بهوقت ساعت هماهنگ جهانی."]]