Hi Joyce,

$campaignCriteria = array();
$san_francisco = new Location();
$san_francisco->id = 1014221;
$campaignCriteria[] = new CampaignCriterion($campaignId, false, 
$san_francisco);

The second argument of CampaignCriterion is supposed to make a negative 
criterion, therefore exclude San Francisco?
https://github.com/googleads/googleads-php-lib/blob/master/src/Google/Api/Ads/AdWords/v201607/CampaignCriterionService.php#L480

Thank you,
Julien


On Monday, October 10, 2016 at 8:00:15 AM UTC+2, Joyce Lava wrote:
>
> Hi Julien,
>
> GeoTargetTypeSetting 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignService.GeoTargetTypeSetting>
>  is 
> used to determine how to geotarget (e.g.  Location of Presence(LOP), Area 
> of Interest (AOI), or both) and not to geotarget locations (e.g. USA). You 
> would have to use the CampaignCriterionService 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService>
>  with Location 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.Location>
>  as 
> the criterion 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.Criterion>.
>  
> In the Location object, you can set the ID of the criteria (for USA, the 
> location ID is 2840) based on the targeting table 
> <https://developers.google.com/adwords/api/docs/appendix/geotargeting>. 
> To exclude geo targets, you should use NegativeCampaignCriterion 
> <https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.NegativeCampaignCriterion>.
>  
> The complete details of location targeting is discussed here 
> <https://developers.google.com/adwords/api/docs/guides/location-targeting>
> .
>
> Hope this helps.
>
> Best,
> Joyce, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/3dc57ce7-0da0-4f5d-99c5-6a3b7eb1c462%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to