Hi Trine,

It seems that you are using Google Ads Scripts 
<https://developers.google.com/google-ads/scripts/docs/your-first-script> and 
not AdWords API. Kindly post your concern in the Google Ads Scripts Forum 
<https://groups.google.com/forum/#!forum/adwords-scripts> instead as this 
is out of scope for our team.

Thanks,
Luis
AdWords API Team

On Friday, January 4, 2019 at 5:12:27 AM UTC+8, Trine.norris wrote:
>
> Hi Support, 
>
> I want to add audiences to some campaigns in Adwords Api. 
>
> This code currently works, however it does not recognize the Audience ID's 
> which I gave, and it does not seem like it corresponds to the ids from the 
> report. E.g. "uservertical::933005" nor 296911073664 works for the 
> audience: "Frequently Eats Dinner Out". Which ID's are required for this 
> function to work?
>
> function interests() {
>    var interests = []
>    var campaignIterator = AdsApp.campaigns().withIds([1668598316]).get()
>    while (campaignIterator.hasNext()){
>      var campaign = campaignIterator.next()
>      var adgroupIterator = campaign.adGroups().get()
>      while (adgroupIterator.hasNext()){
>        var adgroup = adgroupIterator.next()
>         var audienceBuilder = adgroup.targeting().newUserListBuilder();
>   var audienceOperation = audienceBuilder
>     .withAudienceId(1000)              // required
>     .withBidModifier(1.1)             // optional
>   .build();                       // add the audience
> var audience = audienceOperation.getResult()}}}
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/bc5fbf17-b11d-423b-8ed9-ea303ccf8a8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... Trine . norris
    • ... 'Luis Xander Talag (AdWords API Team)' via AdWords API and Google Ads API Forum

Reply via email to