After a bit of digging it appears the best way to do this might be in two steps: 1. Create the campaign 2. Then add criteria separately
According to the location targeting guide<https://developers.google.com/adwords/api/docs/guides/location-targeting>, "you need to create Location objects for each region you want to target and add them using CampaignCriteronService.mutate." And looking back over the aforementioned add_campaign_targeting_criteria.rbexample it appears an existing campaign ID is necessary to add criteria. So it appears OP might be answered, but in case I've missed something or if I'm going about this the wrong way feel free to add your feedback. On Tuesday, May 20, 2014 10:26:25 PM UTC-7, charles wrote: > > Are there examples specific to the Ruby client lib for adding (e.g.) > location criteria/criterion during campaign creation? > > I've read the > add_campaigns.rb<https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201402/basic_operations/add_campaigns.rb> > example > which uses CampaignService for campaign creation. > > And I've read the > add_campaign_targeting_criteria.rb<https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201402/targeting/add_campaign_targeting_criteria.rb>which > uses > CampaignCriterionService for adding location criteria. > > But I haven't seen any examples which use both services during campaign > creation, and (as a novice Rubyist) I'm wondering what are some recommended > patterns. > > If I've missed something in the github repo or other developer docs please > feel free to point me in the right direction. Otherwise I'm keen to know > how others add campaign-level criteria during campaign creation. > > Thanks! > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.