set NegativeCampaignCriterion for location using adword api php

44 views
Skip to first unread message

Satendra Maurya

unread,
Mar 3, 2016, 9:03:22 AM3/3/16
to AdWords API Forum
how to set exclude location for campaign. i tried to found out it . i found this 
$negativeCriterion = new \NegativeCampaignCriterion();
 $negativeCriterion->campaignId = $result->value[0]->id;
 $negativeCriterion->criterion = $location;

but i cannot understand how to pass location here. could you explain with example ?

Anthony Madrigal

unread,
Mar 3, 2016, 4:40:08 PM3/3/16
to AdWords API Forum
Hi Satendra,

You can take a look at this example as a reference. In particular, I highlighted the line that adds a negative keyword. You can use this as a basis on how to add negative locations.

Regards,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages