User Tools

Site Tools


change_existing_ad_shedule

Differences

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

Link to this comparison view

change_existing_ad_shedule [2015/07/08 14:29] (current)
vincenzo created
Line 1: Line 1:
 +<code java>
 +function main() {
 +  var campaignIterator = AdWordsApp.campaigns()
 +      .withCondition('​Name = "​INSERT_CAMPAIGN_NAME_HERE"'​)
 +      .get();
 +  if (campaignIterator.hasNext()) {
 +    var campaign = campaignIterator.next();​
 +    // Add a schedule for Monday, 9AM to 5PM, bid modifier = 1.25.
 +    campaign.addAdSchedule('​MONDAY',​ 9, 0, 17, 0, 1.25);
 +    // The bid modifier is optional, e.g.
 +    // campaign.addAdSchedule('​MONDAY',​ 9, 0, 17, 0);
  
 +    // You can also add an adSchedule as a JSON object, or using
 +    // an existing AdSchedule object.
 +    // Add a schedule for Saturday, 7AM to 11AM, bid modifier = 1.1.
 +    campaign.addAdSchedule({
 +      dayOfWeek: '​SATURDAY',​
 +      startHour: 7,
 +      startMinute:​ 0,
 +      endHour: 11,
 +      endMinute: 0,
 +      bidModifier:​ 1.1
 +    });
 +  }
 +}
 +</​code>​
change_existing_ad_shedule.txt ยท Last modified: 2015/07/08 14:29 by vincenzo