Frequently adjusting CampaignBidModifier based on location criterion

90 views
Skip to first unread message

Tim Johnson

unread,
Sep 15, 2017, 1:44:41 AM9/15/17
to AdWords API Forum
Hi I was hoping to get your expertise with a question I had:

I am looking to continually change the bid modifier for a campaign in 1 specific location.  So I can understand I'll use the CampaignBidModifierService object while passing through a criterion.  My question is:

Is there anyway to simply update the bid modifier on that location without worrying whether there already a criterion ID set up for modifying the bid in that location?  Or, alternatively, should I write my program to do the below:

1. Check to see if there is a criterion that applies to that campaign and that location targeting.

If so:
  2.Get the criterion ID
If not:
   2.Add a new criterion ID

3. Use the CampaignBidModifierService with either the old or new criterion ID.


Is there an easier way to do this.  Is there a script equivalent of saying: "Not matter what the current bid modifier is for my campaign and New York location targeting, now overwrite that bid modifier to be 2."

Thanks again,
Tim

Peter Oliquino

unread,
Sep 15, 2017, 3:07:46 AM9/15/17
to AdWords API Forum
Hi Tim,

Your initial method of updating the bid modifier is already correct. We highly recommend that you first retrieve a list of every object you wish to update (unless you are sure that it exists and have its ID) then apply your modifications accordingly so as to avoid issues such as the EntityNotFound.INVALID_ID error in the process.

Best regards,
Peter
AdWords API Team

Tim Johnson

unread,
Sep 15, 2017, 4:09:40 AM9/15/17
to AdWords API Forum
Hi Peter,

Thanks for the prompt response, that sounds good.  I had a quick follow up question: How do you guys do it for the "adwords solutions" though? I see here you seem to bypass that:
var nyWeather = getWeatherForLocation("New York City, US");

if (nyWeather.weather.snow > 5 && nyWeather.weather.temperature < 273) {
  var adGroup = AdWordsApp.adGroups()
     .withCondition("CampaignName = 'New York Shoes'")
     .withCondition("AdGroupName='Snow boots'")
     .get()
     .next();
  adGroup.bidding().setCpc(adGroup.bidding().getCpc() + 0.3);
}

Peter Oliquino

unread,
Sep 15, 2017, 4:36:08 AM9/15/17
to AdWords API Forum
Hi Tim,

Our team provides support only for AdWords API related concerns and looking at the code and the link you provided it appears that it is more related to the AdWords Scripts. For any clarifications regarding the AdWords Scripts, you may get in touch with their team via the AdWords Scripts Forum for better assistance.

Tim Johnson

unread,
Sep 15, 2017, 4:56:24 AM9/15/17
to AdWords API Forum
Ok, will do.  And lastly, if I have two criterion that have an overlapping geo-targeted radius, what happens to the campaign modifiers then? Will they both be applied? Will one be ignored?

Cheers

Peter Oliquino

unread,
Sep 15, 2017, 6:05:09 AM9/15/17
to AdWords API Forum
Hi Tim,

Interesting question, however, this appears to already be more product related. This being said, you may contact the product experts via the AdWords Community Forum to get the information you need.

Tim Johnson

unread,
Sep 15, 2017, 6:53:40 AM9/15/17
to AdWords API Forum
Understandable, I will ask them there.
Reply all
Reply to author
Forward
0 new messages