Hello,
I'm testing adding a NegativeAdGroupCriterion on an adgroup who is
using automatic placement, to disable a placement.
I managed to make it work, however I do get the error :
"AdGroupCriterionError.ILLEGAL_URL" when trying to disable a placement
whose url shows in the adwords interface, the domain in the interface
(adwords.google.com, not my own interface) shown is : "178.32.32".
Doing a quick search on the web, i see there are some syntax rules for
the domains we can exclude from automatic placements, however this is
a valid domain that adwords chooses to display my ads, i'd imagine
there's a way to disable it, just not managing to figure it out.
Code is looking like this:
$user->LogDefaults();
// Get the AdGroupCriterionService.
$adGroupCriterionService = $user-
>GetAdGroupCriterionService('v201008');
//FAKE ID
$adGroupId = (float) '34242342342';
$placement = new Placement();
$placement ->url = '178.32.32';
//FAKE ID
$placement ->id=(float) '3426346534';
$negativeAdGroupCriterion = new NegativeAdGroupCriterion();
$negativeAdGroupCriterion->adGroupId = $adGroupId;
$negativeAdGroupCriterion->criterion = $placement ;
$operations = array(
new AdGroupCriterionOperation($negativeAdGroupCriterion, NULL,
'ADD'));
$result =
$adGroupCriterionService->mutate($operations);
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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