It works brilliantly! Thanks Ewan.
Tal Ater http://www.talater.com/ On Tuesday, July 17, 2012 4:09:28 AM UTC+3, Ewan Heming wrote: > > I checked out your code in more detail: The problem is that "Linux & Unix" > isn't a CriterionUserInterest, it's a > Vertical<https://developers.google.com/adwords/api/docs/appendix/verticals>. > This code's working for me in the sandbox: > > $interestId = 736; //Linux & Unix > $interest = new Vertical(); > $interest->id = $interestId; > $interest->path = array("Computers & Electronics", "Software", "Operating > Systems", "Linux & Unix"); > $campaignCriterion = new NegativeCampaignCriterion(); > $campaignCriterion->campaignId = $campaignId; > $campaignCriterion->criterion = $interest; > $operations = array(); > $operations[] = new CampaignCriterionOperation($campaignCriterion, 'ADD'); > $campaignCriterionService->mutate($operations); > > Note that you also need to enter the category path, even though you've > already entered an id. > -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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