Adding audiences to ad groups

130 views
Skip to first unread message

Kavitha Acharya

unread,
Oct 9, 2019, 10:38:07 AM10/9/19
to AdWords API and Google Ads API Forum

Hi ,
 
I want to add audiences to ad-groups during its creation using Api call.
In audience targeting, I want to set the type as (In-market audience and Custom intent audience: auto-created) under the vertical Real-Estate. 

Could you please let me know the appropriate service and fields to be set so as to achieve above condition.


Google Ads API Forum Advisor Prod

unread,
Oct 9, 2019, 12:22:24 PM10/9/19
to kavitha...@websitebox.com, adwor...@googlegroups.com

Hi Kavitha,

Thank you for reaching out. If you are using AdWords API, you can use the CriterionUserInterest  targeting type. Please see here to find the Criterion ID you would like to use. Similarly, if you are using Google Ads API, you can see information on targeting criteria and perform a mutate on AdGroupCriterionService in a similar fashion.

Please see this example for how to add an audience to an ad group. You just need to modify it to reflect the information above. 

Cheers,
Anthony
Google Ads API Team



ref:_00D1U1174p._5001UKMjKs:ref

Kavitha Acharya

unread,
Oct 9, 2019, 4:39:53 PM10/9/19
to AdWords API and Google Ads API Forum
Hi Anthony,

Using your instructions, I was able to successfully create In-market audiences. I also want to create custom-intent audiences similar to the attached screenshot. 
Could you please let me know how to add text for custom intent audience. CUSTOM_INTENT criterion accepts only "ID" . I am also not sure what needs to be passed in the ID field.


Regards,
Kavitha
custom-intent audience.PNG

Google Ads API Forum Advisor Prod

unread,
Oct 10, 2019, 2:04:00 PM10/10/19
to kavitha...@websitebox.com, adwor...@googlegroups.com

Hi Kavitha,

In order to create the custom intent audience, you must first create a custom user list using AdWordUserListService. The name that you give the user list will be the text that shows up in the field that you were asking about. Also, the ID you pass will be the ID of the custom user list you created. The UI equivalent is going to Tools & Settings -> Audience Manager if you would like to try it out in the UI first (the ID to pass to the criterion will be the list ID).

Regards,


Anthony
Google Ads API Team



ref:_00D1U1174p._5001UKMjKs:ref

Kavitha Acharya

unread,
Oct 10, 2019, 4:10:58 PM10/10/19
to AdWords API and Google Ads API Forum
Hi Anthony,

Thank you for the information.
During my research , I found the following thread from the forum   https://groups.google.com/forum/#!search/customIntentId|sort:date/adwords-api/_sEkj5vYIMs/v4PJeob_DAAJ   and tried it out.

I was able to successfully add the custom audiences data into the Add manger(please find the attached screenshot).But while trying to link it to the ad-group, it failed with "EntityNotFound.INVALID_ID" error.

Below is the data being passed to CustomAffinityService
let custom_intent_obj = {
'xsi:type' : 'CustomAffinity',
name : custom_audience.name,
CustomAffinityType : 'CUSTOM_INTENT'
}
Below is the data being passed to criterion creation of the custom audience using the id returned from the  CustomAffinityService.
criterion = {
'xsi:type' : 'CriterionCustomIntent',
customIntentId : parseInt(custom_intent.entries[0].id)
}

Below is the soap error.
   '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201809"><requestId>00059493ca5368e50a37a0c81c086208</requestId><serviceName>AdGroupCriterionService</serviceName><methodName>mutate</methodName><operations>64</operations><responseTime>219</responseTime></ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>[EntityNotFound.INVALID_ID @ operations[59].operand.criterion.customIntentId; trigger:\'54487943\', EntityNotFound.INVALID_ID @ operations[60].operand.criterion.customIntentId; trigger:\'54948595\', EntityNotFound.INVALID_ID @ operations[61].operand.criterion.customIntentId; trigger:\'54487358\', EntityNotFound.INVALID_ID @ operations[62].operand.criterion.customIntentId; trigger:\'54513110\', EntityNotFound.INVALID_ID @ operations[63].operand.criterion.customIntentId; trigger:\'54487418\']</faultstring><detail><ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201809"><message>[EntityNotFound.INVALID_ID @ operations[59].operand.criterion.customIntentId; trigger:\'54487943\', EntityNotFound.INVALID_ID @ operations[60].operand.criterion.customIntentId; trigger:\'54948595\', EntityNotFound.INVALID_ID @ operations[61].operand.criterion.customIntentId; trigger:\'54487358\', EntityNotFound.INVALID_ID @ operations[62].operand.criterion.customIntentId; trigger:\'54513110\', EntityNotFound.INVALID_ID @ operations[63].operand.criterion.customIntentId; trigger:\'54487418\']</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EntityNotFound"><fieldPath>operations[59].operand.criterion.customIntentId</fieldPath><fieldPathElements><field>operations</field><index>59</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>criterion</field></fieldPathElements><fieldPathElements><field>customIntentId</field></fieldPathElements><trigger>54487943</trigger><errorString>EntityNotFound.INVALID_ID</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>INVALID_ID</reason></errors><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EntityNotFound"><fieldPath>operations[60].operand.criterion.customIntentId</fieldPath><fieldPathElements><field>operations</field><index>60</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>criterion</field></fieldPathElements><fieldPathElements><field>customIntentId</field></fieldPathElements><trigger>54948595</trigger><errorString>EntityNotFound.INVALID_ID</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>INVALID_ID</reason></errors><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EntityNotFound"><fieldPath>operations[61].operand.criterion.customIntentId</fieldPath><fieldPathElements><field>operations</field><index>61</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>criterion</field></fieldPathElements><fieldPathElements><field>customIntentId</field></fieldPathElements><trigger>54487358</trigger><errorString>EntityNotFound.INVALID_ID</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>INVALID_ID</reason></errors><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EntityNotFound"><fieldPath>operations[62].operand.criterion.customIntentId</fieldPath><fieldPathElements><field>operations</field><index>62</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>criterion</field></fieldPathElements><fieldPathElements><field>customIntentId</field></fieldPathElements><trigger>54513110</trigger><errorString>EntityNotFound.INVALID_ID</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>INVALID_ID</reason></errors><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="EntityNotFound"><fieldPath>operations[63].operand.criterion.customIntentId</fieldPath><fieldPathElements><field>operations</field><index>63</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>criterion</field></fieldPathElements><fieldPathElements><field>customIntentId</field></fieldPathElements><trigger>54487418</trigger><errorString>EntityNotFound.INVALID_ID</errorString><ApiError.Type>EntityNotFound</ApiError.Type><reason>INVALID_ID</reason></errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>' }


could you please let me know what is the issue here?.

Also , If the above used method is invalid, could you please let me know what userlist type I have to use to create the custom audience.
There are LOGICAL,EXTERNAL_REMARKETING,RULE_BASED, SIMILAR and CRM_BASED ,BASIC types.

Regards,
Kavitha
custom-intent audience.PNG

Kavitha Acharya

unread,
Oct 11, 2019, 11:30:41 AM10/11/19
to AdWords API and Google Ads API Forum
Hi Anthony,

I found out that "Invalid entity id" error was due to customAffinityId being passed to criterion field custom-Intent-Id. 
However , I am still stuck in creating custom-intent object using customAffinity Service.

My requirement is to create auto created custom intent audience(Please find the attached) using API call.
Kindly guide me on this  as there is no example or thread available on this topic.

Regards,
Kavitha
custom-intent audience-auto-created.PNG

Google Ads API Forum Advisor Prod

unread,
Oct 11, 2019, 11:44:07 AM10/11/19
to kavitha...@websitebox.com, adwor...@googlegroups.com

Hi Kavitha,

Can you please provide the client customer ID you are using to make the request? Also, can you please share the complete SOAP logs for your request so that we can investigate the error further using  reply privately to author?



Regards,
Anthony
Google Ads API Team



ref:_00D1U1174p._5001UKMjKs:ref

Kavitha Acharya

unread,
Oct 16, 2019, 4:33:58 PM10/16/19
to AdWords API and Google Ads API Forum
Hi Anthony,
I was able to successfully create the custom-intent audiences and link it to add-group. 
The created audiences have type as " Custom intent In-market keywords" when viewed from audience manager. I want the type to be "Custom intent auto created keywords" . Could you please let me know the field /service if there is any to which I can pass this ?

Regards,
Kavitha

Google Ads API Forum Advisor Prod

unread,
Oct 17, 2019, 3:16:36 PM10/17/19
to kavitha...@websitebox.com, adwor...@googlegroups.com

Hi Kavitha,

The only types of audiences you can create are those present in the CriterionUserList types.



Regards,
Anthony
Google Ads API Team



ref:_00D1U1174p._5001UKMjKs:ref
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Google Ads API Forum Advisor Prod

unread,
Oct 18, 2019, 3:52:07 PM10/18/19
to kavitha...@websitebox.com, adwor...@googlegroups.com

Hi Kavitha,

Thank you for the clarification. Unfortunately, that feature is not available through the API since it is an auto-generated list, not one that you create yourself. Please use the UI to create an audience of that type.



Regards,
Anthony
Google Ads API Team



ref:_00D1U1174p._5001UKMjKs:ref
Reply all
Reply to author
Forward
0 new messages