*Bumping this in the event that anyone has come across a solution already.*



On Tuesday, January 21, 2014 12:59:43 PM UTC-6, Stephen Yeargin wrote:
>
>
> Here's a transcript of the error I'm getting.
>
> https://gist.github.com/anonymous/8545993
>
> - Stephen
>
> On Friday, January 17, 2014 1:57:23 PM UTC-6, Ray Tsang (AdWords API Team) 
> wrote:
>>
>> Bastian,
>>
>> Could I trouble you to send the full SOAP request/response (with 
>> sensitive information stripped out) to me using the "Reply to Author" 
>> feature?
>>
>> Thanks,
>>
>> --
>> Ray Tsang (AdWords API Advisor)
>>
>>
>> On Wednesday, January 15, 2014 2:54:36 AM UTC-5, [email protected]:
>>>
>>> Hi there,
>>>  
>>> i am receiving an error while trying to add a "Webpage" Criterion to my 
>>> Campaign with CampaignCriterionService.
>>>  
>>> The error i am receiving is: "An error has occurred: 
>>> [CriterionError.CANNOT_ADD_CRITERIA_TYPE @ operations[0].operand.criterion]"
>>>  
>>> The following source code shows that functionality. Is there an error in 
>>> the code, or is it simply not possible to add a Webpage Criterion with 
>>> Adwords API yet?
>>> Please note that i removed my real customer and campaign id in this 
>>> example.
>>>  
>>>
>>>>   $id = "MY_CUSTOMER_ID";
>>>
>>>   $campaignId = MY_CAMPAIGN_ID;
>>>
>>>   try {
>>>
>>>     
>>>
>>>    $user = new AdWordsUser();
>>>
>>>    $user->LogAll();
>>>
>>>    $user->SetClientCustomerId($id);
>>>
>>>    $campaignCriterionService = 
>>>> $user->GetService('CampaignCriterionService', ADWORDS_VERSION);
>>>
>>>    $param = new WebpageParameter();
>>>>    $param->criterionName = "param1";
>>>>
>>>    $wp = new Webpage();
>>>>
>>>    $wp->parameter = $param;
>>>>
>>>    $campaignCriteria = new CampaignCriterion();
>>>>    $campaignCriteria->campaignId = $campaignId;
>>>>    $campaignCriteria->criterion = $wp;   
>>>>     
>>>>    $operation = new CampaignCriterionOperation();
>>>>    $operation->operand = $campaignCriteria;
>>>>    $operation->operator = 'ADD';
>>>>  
>>>>
>>>    $operations = array();
>>>>    $operations[] = $operation;
>>>>      
>>>>    $result = $campaignCriterionService->mutate($operations);
>>>>      
>>>>    foreach ($result->value as $campaignCriterion) {
>>>>     $this->Session->setFlash("Campaign targeting criterion with ID 
>>>> ".$campaignCriterion->criterion->id." and type 
>>>> ".$campaignCriterion->criterion->CriterionType." was "
>>>>       . "added.");
>>>>    }
>>>>    
>>>>   } catch (Exception $e) {
>>>>    $this->Session->setFlash("An error has occurred: ". 
>>>> $e->getMessage());
>>>>   }
>>>>
>>>  
>>>  
>>> Thank you
>>>  
>>> Best Regards
>>> Bastian 
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to