ad_group_audience_view, ad_group_criterion.type = UNKNOWN

607 views
Skip to first unread message

Oksana Sulyma

unread,
Nov 9, 2022, 7:09:33 AM11/9/22
to Google Ads API and AdWords API Forum
Hello Google Ads API support team! 
Need your help to understand how to know Audience Segment based at ad_group_audience_view data.

Here is my request:

[2022-11-09T11:59:08.757739+00:00] google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v11.services.GoogleAdsService/SearchStream", CustomerId: 6790658471, RequestId: "JsJ4hTAgzCxsCTdmaPRKOA", IsFault: 0, FaultMessage: "None"  
[2022-11-09T11:59:08.783670+00:00] google-ads.DEBUG: Request
-------
Method Name: /google.ads.googleads.v11.services.GoogleAdsService/SearchStream
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/8.0.12 gccl\/16.0.0 gapic\/16.0.0 gax\/1.16.4 grpc\/1.42.0 rest\/1.16.4 pb\/3.19.1+c",
    "x-goog-request-params": "customer_id=<hidden>",
    "developer-token": "REDACTED",
    "login-customer-id": "<hidden>"
}
Request:
{"customerId":"<hidden>","query":"SELECT campaign.id, ad_group.id, segments.ad_network_type, segments.device, segments.click_type, ad_group_criterion.display_name, ad_group_criterion.criterion_id, ad_group_criterion.type, ad_group_criterion.user_list.user_list, ad_group_criterion.status, ad_group_criterion.effective_cpc_bid_micros, ad_group_criterion.effective_cpm_bid_micros, ad_group_criterion.effective_cpc_bid_source, ad_group_criterion.effective_cpm_bid_source, ad_group_criterion.final_urls, ad_group_criterion.final_mobile_urls, segments.date, metrics.clicks, metrics.cost_micros, metrics.impressions, metrics.conversions, metrics.conversions_value, metrics.all_conversions, metrics.all_conversions_value, metrics.cross_device_conversions, metrics.gmail_forwards, metrics.gmail_saves, metrics.gmail_secondary_clicks, metrics.active_view_measurable_cost_micros, metrics.active_view_measurable_impressions, metrics.active_view_impressions, metrics.interactions FROM ad_group_audience_view WHERE segments.date>='2022-05-01' AND segments.date<='2022-05-31'  ORDER BY segments.date DESC "}

And I get the next rows in response as example:
{"results":[{"adGroup":{"resourceName":"<hidden>","id":"<hidden>"},"adGroupAudienceView":{"resourceName":"<hidden>"},"adGroupCriterion":{"resourceName":"<hidden>","criterionId":"<hidden>","displayName":"uservertical::80131","status":"ENABLED","type":"USER_INTEREST","effectiveCpcBidMicros":"2000000","effectiveCpmBidMicros":"10000","effectiveCpcBidSource":"AD_GROUP","effectiveCpmBidSource":"AD_GROUP"},"campaign":{"resourceName":"<hidden>","id":"<hidden>"},"metrics":{"activeViewImpressions":"14","activeViewMeasurableCostMicros":"0","activeViewMeasurableImpressions":"22","allConversionsValue":0,"allConversions":0,"clicks":"0","conversionsValue":0,"conversions":0,"costMicros":"0","crossDeviceConversions":0,"gmailForwards":"0","gmailSaves":"0","gmailSecondaryClicks":"0","impressions":"22","interactions":"0"},"segments":{"adNetworkType":"CONTENT","clickType":"URL_CLICKS","date":"2022-05-31","device":"DESKTOP"}},{"adGroup":{"resourceName":"<hidden>},"adGroupAudienceView":{"resourceName":"<hidden>"},"adGroupCriterion":{"resourceName":"<hidden>","criterionId":"<hidden>","displayName":"95008","status":"ENABLED","type":"UNKNOWN","effectiveCpcBidMicros":"2000000","effectiveCpmBidMicros":"10000","effectiveCpcBidSource":"AD_GROUP","effectiveCpmBidSource":"AD_GROUP"}...

When I get "type":"USER_INTEREST" I know that I need to check https://developers.google.com/google-ads/api/fields/v12/user_interest report to know Audience Segment name correspondent to criterionId. 
When I get ,"type":"UNKNOWN", is there any way to get Audience Segment name?

Could you please advice documentation resource on how to Audience Segment name from API reports? Similar to what we see in UI:
Screenshot 2022-11-09 at 14.07.39.png
Thanks so much in advance!
Oksana

Oksana Sulyma

unread,
Nov 11, 2022, 4:27:15 AM11/11/22
to Google Ads API and AdWords API Forum
Hello! Just wanted to confirm that my question is still actual! Thanks!

Google Ads API and AdWords API Forum

unread,
Nov 14, 2022, 2:54:45 AM11/14/22
to Google Ads API and AdWords API Forum
Re-posting the last inquiry  [https://groups.google.com/g/adwords-api/c/Ak0MTglczxk] from the forum as it wasn't routed to our support queue.

Regards,
Carmela
Google Ads API Team

Google Ads API Forum Advisor

unread,
Nov 14, 2022, 9:44:26 AM11/14/22
to adwor...@googlegroups.com

Hi Oksana,

Thanks for reaching out to the Google Ads API Forum

Yes, you are correct to get "type":"USER_INTEREST" using user_interest report to know affinity categories that are found here: https://developers.google.com/google-ads/api/reference/data/codes-formats#expandable-1

Upon checking your screenshot, I can see that you are referring to a custom combination segment. If my understanding is correct, then you may need to use user_list report instead. However, can you clarify if what you meant here is that while pulling custom combination segments using ad_group_audience_view report you are getting UNKNOWN in Google Ads API?

I asked this because I was able to pull the UI screen data using the below query for the AdWords optimized list customer combination segments. Here’s the below GAQL:

 

SELECT user_list.name,

       user_list.id

FROM   user_list

WHERE  user_list.name LIKE 'AdWords optimized list' 

 

Let us know if you are able to pull the said data using the above report on your end.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2g3RyN:ref

Oksana Sulyma

unread,
Nov 17, 2022, 4:01:31 AM11/17/22
to Google Ads API and AdWords API Forum
Thanks Yasar and team! I have a follow-up question which I've sent privately together with account info. Thank you!
Message has been deleted

Oksana Sulyma

unread,
Nov 18, 2022, 4:54:51 AM11/18/22
to Google Ads API and AdWords API Forum
Hello! Kindly reminder on my question sent privately. 

Google Ads API Forum Advisor

unread,
Nov 18, 2022, 10:08:29 AM11/18/22
to adwor...@googlegroups.com
Hi,

Thank you for sending response privately. We will check and reply on their thread.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2g3RyN:ref

Oksana Sulyma

unread,
Nov 24, 2022, 5:51:16 AM11/24/22
to Google Ads API and AdWords API Forum
Thanks Nirmita and team! I haven't got any update by email, just wanted to check if I'm not missing anything. Thanks!

Google Ads API Forum Advisor

unread,
Nov 24, 2022, 9:10:02 AM11/24/22
to adwor...@googlegroups.com

Hi Oksana,


I'm Darwin, also a member of the Google Ads API team. I work with Nirmita & Yasar and allow me to assist you here. I hope you are doing well today.


Moving forward to your concern, could you please confirm if this is the subject of your private reply "Private message regarding: ad_group_audience_view, ad_group_criterion.type = UNKNOWN"? If yes, then, I want to inform you that my other colleague responded to your concern there. Allow me to reiterate his response to that thread please see below.
 

"Thank you for your private response. I was able to identify the UNKNOWN types (ex 95008 and 95009) as life events. However, this specific type does not appear to be currently supported in the ad_group_criterion.type. That said, you may instead retrieve their details using the life_event (ex. life_event.idlife_event.name) report. Let me know if this helps."


Let us know if you have further questions.


Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2g3RyN:ref

Oksana Sulyma

unread,
Nov 25, 2022, 5:10:31 AM11/25/22
to Google Ads API and AdWords API Forum
Hi Darwin and team! Thanks so much for your response (I didn't get it via email for some reason) - this is very helpful info!!!

Could you please help me to understand a pattern on how to get Audience Segment NAME from API? 

  • Audience segments
    • User list segments
    • Affinity or in-market segments
    • Life event segments
    • Detailed demographic segments
    • Custom audience segments

In our application we use https://developers.google.com/google-ads/api/fields/v12/ad_group_audience_view as data source and  pull ad_group_criterion.display_name,  ad_group_criterion.type, ad_group_criterion.user_list.user_list.
And in order to 'translate' display_name to 'human readable' Audience Segment (similarly to what we see in Google Ads UI )we use:

- Name from https://developers.google.com/google-ads/api/fields/v12/user_list  if ad_group_criterion.user_list.user_list is set (User list segments)
- Name from https://developers.google.com/google-ads/api/fields/v12/user_interest  if ad_group_criterion.type = 'USER_INERST'  (Affinity or in-market segments)

How can we know that display_name that we get in report (ex 95008 and 95009) is  Life event segments or  Detailed demographic segments or Custom audience segments?

Thanks so much for your help again! I'm sure this topic info will be valuable as it's not easy to find answers in documentation. 


Google Ads API Forum Advisor

unread,
Nov 28, 2022, 9:15:04 AM11/28/22
to adwor...@googlegroups.com

Hi Oksana,

Thanks for getting back to us.

For your question “Could you please help me to understand a pattern on how to get Audience Segment NAME from API?”, you may use user_list.name field. However, for your question “How can we know that display_name that we get in report (ex 95008 and 95009) is  Life event segments or  Detailed demographic segments or Custom audience segments?” , you may see below:

 

If you're looking to replicate any Google Ads UI reports via Google Ads API, then you may provide us the complete Ads UI screenshot (not Excel screenshot) via reply privately to author option so that we can provide specific recommendations.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2g3RyN:ref

Oksana Sulyma

unread,
Dec 1, 2022, 3:35:58 AM12/1/22
to Google Ads API and AdWords API Forum
Thanks for your answer Yasar. 
My question was rather about how to understand what is segment type when we get a constant as audience name.
As example, for this query:
SELECT ad_group_criterion.display_name, ad_group_criterion.type FROM ad_group_audience_view I got 
'95008 ' and 'UNKNOWN'. 
How can I know if 95008 is life_event.id or demographic.id? Any other fields I need to pull from ad_group_audience_view to know audience segment type? 
Thanks you again for all the help on my questions!
Oksana 

Google Ads API and AdWords API Forum

unread,
Dec 2, 2022, 5:22:05 AM12/2/22
to Google Ads API and AdWords API Forum
Re-posting the last inquiry [https://groups.google.com/g/adwords-api/c/Ak0MTglczxk] from the forum as it wasn't routed to our support queue.

Regards,
Carmela
Google Ads API Team

Google Ads API Forum Advisor

unread,
Dec 5, 2022, 1:27:37 AM12/5/22
to adwor...@googlegroups.com
Hi Oksana,

Thank you for getting back to us. I am Sherwin from Google Ads API and I hope that you are doing well today.

Moving forward to your concern, life_events is not on the list of the ad_group_criterion.type for now. However I created a feature request for this so that it will be available in the future. Furthermore, please note that this is a subject for review and for now, what we can do is to advise you to keep an eye on our blog post for the updates.

For now, what we can do is to advise you to continue that query that you are using and you may also use the life_event report and the list of life events criterion ids in this document to check the criterion id which was provided by my colleague Darwin earlier in this thread.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


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