AdWords
4.4K members online now
4.4K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Exception requests with AdWords Scripts

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Good day, dear experts!


How can I implement an exception request when creating ads and keywords with AdWords Scripts? (Since this is done in Editor - https://support.google.com/adwords/editor/answer/30578?hl=en ).


I read the documentation - https://developers.google.com/adwords/api/docs/guides/exemption-requests


But I do not understand how you can implement it in the script(


For example, the function of which I create keywords:


function findAndCreateKeywords(key, AdApp, AdGroup) {
var tmp = AdApp.keywords().withCondition('Text = "' + key + '"').get();
if (!tmp.hasNext()) {
AdGroup.createKeyword(key);
Logger.log(key + ' created');
} else {
Logger.log(key + ' found');
}

How to change it so that I can submit exception request when a keyword has PolicyViolationError ?


1 Expert replyverified_user

Re: Exception requests with AdWords Scripts

Top Contributor
# 2
Top Contributor

Hi @Alex Y

 

I'm not sure you'd be able to do this in a single script within AdWords itself as the system has no way of "knowing" that a policy violation is possible until after the Keyword is created.  The Editor can do this because the program contains its own checks - creating a new Keyword in Editor is in that way similar to creating a new Keyword in the AdWords front end.

 

You'd have to use a separate script that checked for Keywords with a status of "Disapproved" (using the method getApprovalStatus() which, unfortunately, doesn't appear to be an option to use for a condition, so you may have to iterate all Keywords to check; I haven't tested this).

 

Jon

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits