//-----------------------------------
// Sitelink's Disapproved Alert
// Created By: Amir
//-----------------------------------
function main() {
// Let's start by getting all of the sitelinks that are disapproved
var sitelinkIterator = AdWordsApp.extensions()
.withCondition("ApprovalStatus != APPROVED")
.get();
// Then we will go through each one
while (sitelinkIterator.hasNext()) {
var sitelink = sitelinkIterator.next();
// now we print a log and send an alert email
Logger.log("sitelink disapproved: " + sitelink.getLinkText());
}
}
Thanks in advance!
var sitelinkIterator = AdWordsApp.extensions()
.sitelinks()
.withCondition("ApprovalStatus != APPROVED")
.get();
.withCondition("DisapprovalShortNames != ''")