What's the best way to setup multiple Criterion values for the same item?
35 views
Skip to first unread message
Gary Jiang
unread,
Apr 16, 2018, 7:12:37 AM4/16/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hi,
I am trying to set up some adgroup criterion values and age range. Since I found that only one criteria id is accepted for one operand, I have to put multiple operands in a request to set the criteria to be something like "Eligible for 18-25 and 65+, and excluded for all the rest age range" by using a combination of BiddingAdGroupCriterion and NegativeAdGroupCriterion. I was wondering if this is the best implementation we could have using the latest version of AdWords API for now. Thanks
Gary
Bharani Cherukuri (AdWords API Team)
unread,
Apr 16, 2018, 1:44:18 PM4/16/18
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AdWords API Forum
Hello Gary,
You're right. You will need to have multiple operands for both Positive and Negative AdGroup criterion. You could use AdGroupCriterionService.mutate() and select the AdGroupCriterion as BiddableAdGroupCriterion with Criterion as AgeRange to include all positive criterion. To exclude a specific age group criterion, you can use NegativeAdGroupCriterion. You may refer to this code sample in Java as a reference. Code samples in other languages can be found here.