Script: Remove Placement in Display Campaign based on bad CTR performance

88 views
Skip to first unread message

Natalia Camerzan

unread,
Feb 14, 2018, 3:23:07 PM2/14/18
to AdWords Scripts Forum
Hi,

Does anyone have a script which removes placements in Display Campaign, where CTR is >5% ?

Thanks 

Thea Vega (AdWords Scripts Team)

unread,
Feb 14, 2018, 11:00:21 PM2/14/18
to AdWords Scripts Forum
Hi Natalia,

Please see below sample code to help you get started:

function main(){
 
var placementSelector = AdWordsApp.display()
 
.placements()
 
//fetches placements with campaign type of display network
 
.withCondition("AdNetworkType1 = CONTENT") ;
 
//you may change this depending on your requirement
 
.withCondition("Ctr > 5");
 
 
var placementIterator = placementSelector.get();
 
while (placementIterator.hasNext()) {
   
var placement = placementIterator.next();
   
Logger.log(placement.getCampaign().getName());
    placement
.remove();
 
}
}

The script iterates through placements for display campaigns with Ctr > 5% and deletes the said placements. I would suggest for you to Preview the script first to see if it aligns with your requirement.

Thanks,
Thea
AdWords Scripts Team

Thea Vega (AdWords Scripts Team)

unread,
Feb 15, 2018, 12:41:25 AM2/15/18
to AdWords Scripts Forum
Hi Natalia,

Apologies as I have not noticed that there was an extra ";" on the script that I have provided earlier. With this, please change line 5 with the code line below.

  .withCondition("AdNetworkType1 = CONTENT")

Reply all
Reply to author
Forward
0 new messages