User Tools

Site Tools


removing_existing_campaign_locations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

removing_existing_campaign_locations [2015/07/28 15:14] (current)
vincenzo created
Line 1: Line 1:
 +<code javascript>​
 +// Remove Location ​
 +function main() {
  
 + var campaignIterator = AdWordsApp.campaigns()
 +//      .withCondition('​Name = "​[make_0055]{b}:​ yamaha"'​)
 +      .get();
 +
 +
 +  while (campaignIterator.hasNext()) {
 +    var campaign = campaignIterator.next();​
 +    var locationIterator = campaign.targeting().targetedLocations().get();​
 +
 +    while (locationIterator.hasNext()) {
 +      //var targetedLocation = locationIterator.next();​
 +      locationIterator.next().remove();​
 +
 +     
 +    }
 +  }
 +}
 +</​code>​
removing_existing_campaign_locations.txt ยท Last modified: 2015/07/28 15:14 by vincenzo