Re: Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
Hi All, Thank you for your patience. This is actually working as intended. This is designed to be used as a negative criterion at the Campaign Level. Apologies for the confusion. I'll work on updating the documentation. Thanks, On Tuesday, February 25, 2014 10:24:23 AM UTC-5, Stephen Yeargin wrote: > > > *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, >>> b.ka...@mso-digital.dewrote: 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
*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, b.ka...@mso-digital.dewrote: >>> >>> 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
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, b.ka...@mso-digital.dewrote: >> >> 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 discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
Okay, should be sent to you. Could you find any reasons in that request? Am Freitag, 17. Januar 2014 20:57:23 UTC+1 schrieb Ray Tsang (AdWords API Team): > 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, b.ka...@mso-digital.dewrote: >> >> 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 discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
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, b.ka...@mso-digital.de wrote: > > 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 discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Adding CampaignCriterion Webpage results in CriterionError.CANNOT_ADD_CRITERIA_TYPE
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 discussion group: http://googleadsdeveloper.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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@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 Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.