Hi Team,
I’d like to confirm whether it’s possible to push the following audience
types at the Ad Group level using the Google Ads API v19:
detailed_demographics
life_events
custom_audience
combined_audience
If this is supported, could you please share the recommended process and
confirm if the below Java snippet is along the right lines?
// Example: Attaching an audience to an AdGroup
AdGroupCriterion adGroupCriterion = AdGroupCriterion.newBuilder()
.setAdGroup(ResourceNames.adGroup(customerId, adGroupId))
.setStatus(AdGroupCriterionStatus.ENABLED)
.setAudience(
AudienceInfo.newBuilder()
// Replace with the audience type ID
// For example: detailed demographics, life event, custom audience, etc.
.setAudience(ResourceNames.audience(customerId, audienceId))
.build()
)
.build();
AdGroupCriterionOperation operation = AdGroupCriterionOperation.newBuilder()
.setCreate(adGroupCriterion)
.build();
try (AdGroupCriterionServiceClient adGroupCriterionServiceClient =
googleAdsClient.getLatestVersion().createAdGroupCriterionServiceClient()) {
MutateAdGroupCriteriaResponse response =
adGroupCriterionServiceClient.mutateAdGroupCriteria(
String.valueOf(customerId), Arrays.asList(operation));
System.out.printf("Created ad group criterion with resource name: %s%n",
response.getResults(0).getResourceName());
}
Could you confirm if this approach works for:
detailed_demographics
life_events
custom_audience
combined_audience
Or if there are any specific constraints or additional setup steps needed
for these audience types?
Thanks in advance for your support!
Best regards,
Abhishek Singh
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/adwords-api/ed42f284-0c3b-44fa-b385-b0170b0fab05n%40googlegroups.com.