I was wondering if anyone else had same issues with this script, which otherwise is a perfect solution for bad/broken URLs. The issues above do not take away from main functionality, but I couldn't figure out why it is happening, because everything looks good on the script.
Also the following line of code resulted in invalid operation error:
Utilities.sleep(1000 - (then - now));
which was easily corrected by omitting 1000, so the following works w/o producing an error:
Utilities.sleep(then - now);
Any feedback is greatly appreciated!
Thanks,
_oleg
if (anythingChanged) {
shelper.flush();
if (badUrls > 0 && shelper.config.email.length > 0 && shelper.config.emailPreference == "As soon as an error is discovered")
var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords());
anythingChanged = (shelper.config.checkAds && checkUrls(AdWordsApp.ads())) || anythingChanged;
AdWordsApp.keywords()
AdWordsApp.keywords().withCondition("Status = ACTIVE")
The following line of code resulted in invalid operation error:
Utilities.sleep(1000 - (then - now));which was easily corrected by omitting 1000, so the following works w/o producing an error:
Utilities.sleep(then - now);
The label link_checked does not exist. (line 96)
Hi Cyprien,I'll try to enhance this code example a bit more to suggest how certain modifications may be done, but for now, this is the part you are looking for:var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords());
anythingChanged = (shelper.config.checkAds && checkUrls(AdWordsApp.ads())) || anythingChanged;AdWordsApp.keywords()should become
AdWordsApp.keywords().withCondition("Status = ACTIVE")
You can find the necessary column name for filtering on the API reports page under the corresponding report: https://developers.google.com/adwords/api/docs/appendix/reports#keywordsCheers,Anash P. Oommen,AdWords Scripts Team
var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords().withCondition("CampaignStatus = ACTIVE"));
anythingChanged = (shelper.config.checkAds && checkUrls(AdWordsApp.ads().withCondition("CampaignStatus = ACTIVE"))) || anythingChanged;
Invalid argument: http://www.hidden.<?>/?xid=sem-Brand%20%3E%20hidden-hidden-{keyword} (line 112)
I tried your fix, but to no avail.
var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords().withCondition("CampaignStatus = ACTIVE").withCondition("AdGroupStatus = ENABLED");
var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords().withCondition("CampaignStatus = ACTIVE").withCondition("AdGroupStatus = ENABLED").withCondition("AdStatus = ACTIVE");
var anythingChanged = shelper.config.checkKeywords && checkUrls(AdWordsApp.keywords().withCondition("CampaignStatus = ACTIVE").withCondition("AdGroupStatus = ENABLED").withCondition("Status = ENABLED");