User Tools

Site Tools


check_existing_locations_and_bid_adjustments_in_bulk

This is an old revision of the document!


function main() {
 
// Apply changes to all campaigns

  var campaignIterator = AdWordsApp.campaigns()
        .withCondition('Name = "[make_0055]{b}: yamaha"')
        .get();
  
  while (campaignIterator.hasNext()) {
    var campaign = campaignIterator.next();

// Here you check that targeting already existing for the campaigns

    var locationIterator = campaign.targeting().targetedLocations().get();

    while (locationIterator.hasNext()) {
      var targetedLocation = locationIterator.next();
      Logger.log('Location name: ' +
          targetedLocation.getName() + ', country code: ' +
          targetedLocation.getCountryCode() + ', bid modifier: ' +
          targetedLocation.getBidModifier());
    }
  }
}
check_existing_locations_and_bid_adjustments_in_bulk.1434808762.txt.gz · Last modified: 2015/06/20 15:59 by vincenzo