Unable to customizing features of a campaign setup - Exclusion and Targeting method

95 views
Skip to first unread message

Casper Crause

unread,
Nov 9, 2020, 10:06:47 AM11/9/20
to AdWords API and Google Ads API Forum
Hi,

I've been trying to write a script that adds campaigns and customizes targeting and language options of that campaign

It's based off this one :
https://github.com/googleads/google-ads-python/blob/master/examples/basic_operations/add_campaigns.py

My question is:
How Can I change the Targeting method from the default:
 People in, or who show interest in your targeted locations 
to some the other options such as:
 People in or regularly in your targeted locations

The attached screen shot was taken in Google Ads Editor, but the operation needs to executed with a python script.

Which service should I use ?

Thanks

Casper Crause

unread,
Nov 9, 2020, 10:09:20 AM11/9/20
to AdWords API and Google Ads API Forum
targeting.png

Google Ads API Forum Advisor Prod

unread,
Nov 9, 2020, 11:58:36 PM11/9/20
to ccra...@gmail.com, adwor...@googlegroups.com
Hi Casper,

Thank you for reaching out.

Could you confirm if you are indeed referring to the Google Ads Editor?

If yes, then unfortunately, our team is unfamiliar with the features from the said Editor as it is already outside of our scope, and would not be able to provide further comment as to its equivalent in the Google Ads API. For the available location targeting features using the API, you may refer to this guide.

You may also refer to this guide for the different criteria you can use to either target or exclude.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q278Ebv:ref

Casper Crause

unread,
Nov 10, 2020, 7:29:59 AM11/10/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Yes, I was indeed using Google Ads Editor.

I had a look at the resources that you sent.

After some research, I learnt that I need to set a GeoTargetingType  as per this page:
https://developers.google.com/google-ads/api/reference/rpc/v6/GeoTargetingTypeEnum.GeoTargetingType

There is a function that targets locations in this script:
https://github.com/googleads/google-ads-python/blob/master/examples/targeting/add_campaign_targeting_criteria.py
called ` create_location_op  `

I was wondering how I could add a GeoTargetingType Enum by adding :
geo_targeting_enum = client.get_type('GeoTargetingTypeEnum') into the function And then changing the targeting type to: geo_targeting_enum.LOCATION_OF_PRESENCE
How do we change the GeoTargetingType?

Because my understanding is that all we can change with the current function is the  campaign_criterion.location.geo_target_constant which we then set equal to  

geo_target_constant_service.geo_target_constant_path(location_id)



--

Casper Crause

Cell:     072 475 8969

Google Ads API Forum Advisor Prod

unread,
Nov 17, 2020, 12:23:21 AM11/17/20
to ccra...@gmail.com, adwor...@googlegroups.com

Hi,

Could you confirm if my understanding is correct that you want to set AREA_OF_INTEREST value to PositiveGeoTargetType. If yes, then this is not possible as the available values that you can set to this field is listed on this document.

Let me know if you have further questions.

Regards,

Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q278Ebv:ref
Reply all
Reply to author
Forward
0 new messages