How can we set targeting when creating adgroup through adwords api?

125 views
Skip to first unread message

하진호

unread,
Feb 13, 2017, 2:27:27 PM2/13/17
to AdWords API Forum
Hi there,

How can we set targeting when creating adgroup through adwords api?


Vishal Vinayak (Adwords API Team)

unread,
Feb 13, 2017, 7:01:05 PM2/13/17
to AdWords API Forum
Hi,

There are various targeting types available in AdWords API. This example in Java shows how to add placements and verticals to an ad group during creation. Same example is available in other client libraries as well. Please revert if you have other questions. 

Regards,
Vishal, AdWords API Team

하진호

unread,
Feb 14, 2017, 3:12:42 AM2/14/17
to AdWords API Forum
Thanks Vishal,
But perhaps my question was not clear enough. 
I already know the way you told us. However, according to the example you gave, all gender and ages are automatically selected as an adgroup. But what I would like to do is to select only specific ages and gender for demographic targeting. Please note that I am also aware of how to add demographicTargeting after the adgroup id has been generated. So I would like to know how to set these specific demographic targeting before adgroup id gets generated

2017년 2월 14일 화요일 오전 4시 1분 5초 UTC+9, Vishal Vinayak (Adwords API Team) 님의 말:

Vishal Vinayak (Adwords API Team)

unread,
Feb 14, 2017, 3:57:31 PM2/14/17
to AdWords API Forum
Hi,

To add a specific gender and age ad group criterion to an ad group, you can refer to this example. The example shows how to add gender as a biddable ad group criterion and age range as a negative criterion; however you can use the following code snippet to ad age range as a biddable ad group criterion as well: 

    AgeRange a18to24 = new AgeRange();
    a18to24.setId(503001L);
    
    BiddableAdGroupCriterion ageBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
    ageBiddableAdGroupCriterion.setAdGroupId(adGroupId);
    ageBiddableAdGroupCriterion.setCriterion(a18to24);

Please note that an ad group ID is required in the setAdGroupId() method for you to be able to target an ad group. If you plan to reuse the ageBiddableAdGroupCriterion object, you can initially set the criterion on the object using setCriterion() method and set the ad group ID at the time of the creation of the operation

Although, AgeRange and Gender can be used as targeting criteria on an ad group, I would suggest referring to the Criteria Usage Guide to check if you are allowed to use a particular criteria on your ad group type (search, display, SNDS etc). A complete list of codes for gender and age range targeting is available on this page

Please let me know if you have further questions. 
Reply all
Reply to author
Forward
0 new messages