Campaign GeoTargetTypeSettings for exclude option

45 views
Skip to first unread message

Man Mohan Mishra

unread,
Jan 23, 2019, 10:44:27 AM1/23/19
to AdWords API and Google Ads API Forum

Hi,
How can I access the options of Exclude under the Locations option in campaigns through the API ?
Like I'm trying to set Exclude as "People in, or who show interest in, your excluded locations".

Cheers,
Man

googleadsapi...@google.com

unread,
Jan 23, 2019, 3:38:36 PM1/23/19
to AdWords API and Google Ads API Forum
Hello Man, 

I see that you're looking to exclude the Location criteria. You may use the CampaignCriterionService.mutate() operation with isNegative field set to true to set the negative criteria. You may refer to the AddCampaignTargetingCriteria code sample in Java as a reference to exclude criteria. Code samples in other languages can be found here. The code sample illustrates on how to add keyword as negative criteria. Please find sample logs below as a reference. 

Request: 
<operations> 
<operator>ADD</operator> 
<operand xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201806" xsi:type="ns6:NegativeCampaignCriterion"> 
<ns6:campaignId>1581311984</ns6:campaignId> 
<ns6:criterion xsi:type="ns6:Location"> 
<ns6:id>2484</ns6:id> 
</ns6:criterion> 
</operand> 
</operations>

Response:
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NegativeCampaignCriterion"> 
<campaignId>1581311984</campaignId> 
<isNegative>true</isNegative> 
<criterion xsi:type="Location"> 
<id>2484</id> 
<type>LOCATION</type> 
<Criterion.Type>Location</Criterion.Type> 
<locationName>Mexico</locationName> 
<displayType>Country</displayType> 
<targetingStatus>ACTIVE</targetingStatus> 
</criterion> 
<CampaignCriterion.Type>NegativeCampaignCriterion</CampaignCriterion.Type>

If this does not address your concern, could you please share a screenshot of the Google Ads UI?

Thanks,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@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/58b0785c-3bd8-4380-b5df-075bf8b200b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Man Mohan Mishra

unread,
Jan 24, 2019, 4:15:17 AM1/24/19
to AdWords API and Google Ads API Forum
Hi Bharani,

I don't want to add negative keywords/criterion. I basically want to select options under Location Setting (attached in the screenshot) through AdWords API.Screenshot 2019-01-24 at 2.42.08 PM.png

Cheers,
Man

googleadsapi...@google.com

unread,
Jan 24, 2019, 2:52:41 PM1/24/19
to AdWords API and Google Ads API Forum
Hello Man, 

It is currently not possible to implement the Location Settings through the API. You will only be able to target or exclude locations based on the Location IDs through the API. 

Let me know if you have any further questions.

Regards,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages