Perfect! This works great. However, I'm running into an error when I try to use the same technique to include IP exclusions. Here is the code:
# Add language & location & IP targeting from table for campaign in campaigns['value']: operations = [{ 'operator': 'ADD', 'operand': { 'campaignId': campaign['id'], 'criterion': { 'xsi_type': 'Language', 'id': row['language'], 'xsi_type': 'Location', 'id': row['location'], 'xsi_type': 'IpBlock', 'ipAddress': 'row['ip']' } } }] result = campaign_criterion_service.mutate(operations) It was working fine, until I tried to add the IP exclusion. Any suggestions? On Thursday, April 26, 2018 at 1:51:08 AM UTC-4, Peter Oliquino (AdWords API Team) wrote: > > Hi Neil, > > You would need to make a separate call using a different service when > applying campaign level criteria. The AdWords API service that you can use > is the CampaignCriterionService > <https://developers.google.com/adwords/api/docs/reference/v201802/CampaignCriterionService> > . > > As for location targeting > <https://developers.google.com/adwords/api/docs/guides/location-targeting>, > you can refer to our geo targeting spreadsheet > <https://developers.google.com/adwords/api/docs/appendix/geotargeting> for > the Location criteria you wish to target. You can then create your > Location > <https://developers.google.com/adwords/api/docs/reference/v201802/CampaignCriterionService.Location> > and Language > <https://developers.google.com/adwords/api/docs/reference/v201802/CampaignCriterionService.Language> > CampaignCriterion > and you can refer to this example code > <https://developers.google.com/adwords/api/docs/samples/python/targeting#add-targeting-criteria-to-a-campaign> > as > to how. > > Let me know if this helps. > > Best regards, > Peter > AdWords API Team > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/ec7db723-5864-4632-ab07-0727783f775f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.