I am able to create campaign successfully and  adgroup.

i have added code for demographics targeting : age, gender and parental 
status.

Suppose a user has selected age range "18-24"

next i am using 
AgeRange newAge = new AgeRange();
newAge.setId("id as per google api");

BiddableAdGroupCriterion biddableAdGroupCriterion = new 
BiddableAdGroupCriterion();
    biddableAdGroupCriterion.setAdGroupId(adGroup.getId());
    biddableAdGroupCriterion.setCriterion(newAge);
AdGroupCriterionOperation genderAdGroupCriterionOperation = new 
AdGroupCriterionOperation();
genderAdGroupCriterionOperation.setOperand(biddableAdGroupCriterion);
genderAdGroupCriterionOperation.setOperator(Operator.ADD);

// i am adding all "AdGroupCriterionOperation" to an array "adGrpOperations
".
adGrpOperations.add(genderAdGroupCriterionOperation);

AdGroupCriterionReturnValue adGrpresult = 
adGroupCriterionService.mutate(adGrpOperations.toArray(new 
AdGroupCriterionOperation[adGrpOperations.size()]));

this code is working fine, i do not get any error.. my campaign and adgroup 
is created. but when i check in google , all age range are targeted... for 
not including the other age range, do i need to use NegativeAdGroupCriterion? 

am i doing something wrong in this?..please help


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dbacc0dc-50d6-488a-b905-b414164a26dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... V54328u
    • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... V54328u
      • ... V54328u
        • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
          • ... V54328u
            • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum
              • ... V54328u
                • ... 'Sreelakshmi Sasidharan (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to