Add automatic placement into shared exclude placement list

49 views
Skip to first unread message

Yaniv Lev-Ari

unread,
Dec 26, 2018, 9:25:08 PM12/26/18
to Google Ads Scripts Forum
Hi,

I had a script that exclude placements with bad ctr and email me the list so I can add them to the shared list.

I want the script to add it by itself, 
but it doesn't do that.

here is the relevant part of the script:

var EXCLUDED_PLACEMENT_LIST_NAME = 'test_list';
.
.
.


    var domain = matchedDomains[i];
    Logger.log("  " + campaignExcludedPlacementCounter + ") excluding the domain: " + domain + " CTR = " + ctr); 
      
    DOMAIN_LIST = DOMAIN_LIST + " \n " + domain;
      
   var excludedPlacement = campaign.display().newPlacementBuilder().withUrl(domain).exclude().getResult();
     
      
   var excludedPlacementListIterator = AdWordsApp.excludedPlacementLists()
          .withCondition('Name = "' + EXCLUDED_PLACEMENT_LIST_NAME + '"')
          .get();
var excludePlacementList = excludedPlacementListIterator.next();
      excludePlacementList.addExcludedPlacement(domain);
      
      



Please advise


Hiroyuki Miyauchi (Google Ads Scripts Team)

unread,
Dec 27, 2018, 12:38:56 AM12/27/18
to Google Ads Scripts Forum
Hello Yaniv,

Could please confirm what you meant by "I want the script to add it by itself, but it doesn't do that."? Are you seeing any errors or encountering any issues? If so, could you please provide the details so I could further investigate and provide suggestions?

Regards,
Hiroyuki
Google Ads Scripts Team

Yaniv Lev-Ari

unread,
Dec 27, 2018, 6:24:59 AM12/27/18
to Google Ads Scripts Forum
I do not see any error

Before I added the lines I attached, 
The scripts only exclude the placements from the campaign,
and send me the list to my email.


I would like that the script will also add those placements to a certain shared exclude placement list

I don't get any errors,
but It doesn't add those placements to the list

 




בתאריך יום חמישי, 27 בדצמבר 2018 בשעה 07:38:56 UTC+2, מאת Hiroyuki Miyauchi (Google Ads Scripts Team):

Yaniv Lev-Ari

unread,
Dec 27, 2018, 6:27:18 AM12/27/18
to Google Ads Scripts Forum
Weird...

It didn't show any error while preview,
But now,
I run the script,
and I see an error:

Placement URLs must be provided in a valid URL format

בתאריך יום חמישי, 27 בדצמבר 2018 בשעה 13:24:59 UTC+2, מאת Yaniv Lev-Ari:

Hiroyuki Miyauchi (Google Ads Scripts Team)

unread,
Dec 28, 2018, 1:36:37 AM12/28/18
to Google Ads Scripts Forum
Hello Yaniv,

Could you please provide your CID and script name via Reply privately to author so I can further investigate the issue?

Regards,
Hiroyuki
Google Ads Scripts Team

Yaniv Lev-Ari

unread,
Dec 30, 2018, 2:26:30 PM12/30/18
to Google Ads Scripts Forum
Just did :)

בתאריך יום שישי, 28 בדצמבר 2018 בשעה 08:36:37 UTC+2, מאת Hiroyuki Miyauchi (Google Ads Scripts Team):

Hiroyuki Miyauchi (Google Ads Scripts Team)

unread,
Jan 2, 2019, 3:19:40 AM1/2/19
to Google Ads Scripts Forum
Hello Yaniv,

My apologies for the delayed response.

The reason why you are seeing the error is because the script is trying to add Mobile app placements or mobile app category placements to exclude placement list. As stated in this guide, Mobile app placements and mobile app category placements are not supported in Google Ads Script at this moment.

You may follow our blog for announcements and new releases.

Regards,
Hiroyuki
Google Ads Scripts Team
Reply all
Reply to author
Forward
0 new messages