Default value for ad ops criterion

16 views
Skip to first unread message

Gary Jiang

unread,
Apr 16, 2018, 2:58:28 AM4/16/18
to AdWords API Forum
Hi,

I was trying to set some criterion options to my adgroup using the API, and I found that if I only need to enable one item for a specific criteria, I need to include several "NegativeAdGroupCriterion" operand in one API since it seems the default value for each item is enable. So I have to send such a request if I want to make the adgroup only targeted to Male, my request message should be like this:
{
                'xsi_type': 'AdGroupCriterionOperation',
                'operator': operator,
                'operand': {
                    'xsi_type': 'NegativeAdGroupCriterion',
                    'adGroupId': ad_group_id,
                    'criterion': {
                        'xsi_type': 'Gender',
                        'id': *id for Female*,
                    }
                }
            },
{
                'xsi_type': 'AdGroupCriterionOperation',
                'operator': operator,
                'operand': {
                    'xsi_type': 'NegativeAdGroupCriterion',
                    'adGroupId': ad_group_id,
                    'criterion': {
                        'xsi_type': 'Gender',
                        'id': *id for unknown*,
                    }
                }
            }
 I was wondering if I use it correctly or if there is any easier way. Thanks

 

Vincent Racaza (AdWords API Team)

unread,
Apr 16, 2018, 4:48:45 AM4/16/18
to AdWords API Forum
Hi Gary,

As you can see in this table, the Gender criterion can be targeted or excluded in the ad group level. And yes, by default, all genders are targeted. If your goal is to target the male gender only, then use the BiddableAdGroupCriterion instead. Using the NegativeAdGroupCriterion would mean that all genders (e.g. Male and Undetermined) are targeted except the specific gender (e.g. Female) you included in your request.

Let me know if you have further clarifications.

Thanks,
Vincent
AdWords API Team
Reply all
Reply to author
Forward
0 new messages