I have a little app to remove current audience lists from Ad Groups and add 
the one I want, but I can't figure out how to update the Targeting Setting 
from Observation to Targeting. Anyone know how to do that?

This is what I have to add a new Audience List to an Ad Group: 


               
 // create user list criterion. Set eligible makes it target
 CriterionUserList userListCriterion = new CriterionUserList();
 Long userListId = 1111L;
 userListCriterion.setUserListId(userListId);
 userListCriterion.setUserListEligibleForSearch(true);


 // Create ad group criterion
 BiddableAdGroupCriterion adgroupCriterion = new BiddableAdGroupCriterion();
 adgroupCriterion.setAdGroupId(1111L);
 adgroupCriterion.setCriterion(userListCriterion);


 // Create operation
 AdGroupCriterionOperation operation = new AdGroupCriterionOperation();
 operation.setOperand(adgroupCriterion);
 operation.setOperator(Operator.ADD);


 AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {
operation};


 // Apply the criterion
 AdGroupCriterionReturnValue result = adgroupCriterionService.mutate(
operations);

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/087dbdbd-b00f-4878-97b2-c9c73cfa2dae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • How to ... Josh Barr
    • RE... googleadsapi-forumadvisor via AdWords API and Google Ads API Forum

Reply via email to