Hi Tal, Just want to tell up-front that targeting User Interests is limited to a subset of beta customer. If you are not in the beta program you won't be able to use this type of criteria via the API.
You are actually looking at https://developers.google.com/adwords/api/docs/reference/latest/AdGroupCriterionService.CriterionUserInterest object, the code is very similar to adding verticals just that you have to submit the interest id instead of the vertical path. Interest ids can be retrieved using this service https://developers.google.com/adwords/api/docs/reference/latest/ConstantDataService#getUserInterestCriterion Best, -David Torres - AdWords API Team On Tuesday, July 31, 2012 9:06:49 AM UTC-4, Tal Ater wrote: > > OK, it actually didn't work. > > When adding it as a Verical, it added it as a *Topic*. What I actually > need is to add it under *Interests & Remarketing*. > > > The following screenshot is from the bottom of the campaign management > screen (under Exclusions): > > > Tal Ater > http://www.talater.com/ > > > On Wednesday, July 18, 2012 11:28:19 AM UTC+3, Tal Ater wrote: >> >> 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 [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
