Error on getting Metrics from Asset_group

147 views
Skip to first unread message

Cantare John

unread,
Nov 20, 2023, 11:09:43 AM11/20/23
to Google Ads API and AdWords API Forum
In docs, it is noted that ASSET_GROUP is RESOURCE WITH METRICS but when im trying to get metrics with this query
{
"query": "SELECT campaign.id, asset_group.id, metrics.all_conversions, metrics.all_conversions_value, metrics.clicks, metrics.conversions,metrics.cost_micros, metrics.impressions, metrics.interactions, metrics.view_through_conversions FROM asset_group"
}
Im getting this error

 "errors": [  {                       
 "errorCode": {                           
 "queryError": "PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE"                         },        "message": "Cannot select or filter on the following metrics: 'all_conversions'(could not support requested resources: 'ASSET_GROUP'), 'all_conversions_value'(could not support requested resources: 'ASSET_GROUP'), 'clicks'(could not support requested resources: 'ASSET_GROUP'), 'conversions'(could not support requested resources: 'ASSET_GROUP'), 'cost_micros'(could not support requested resources: 'ASSET_GROUP'), 'impressions'(could not support requested resources: 'ASSET_GROUP'), 'interactions'(could not support requested resources: 'ASSET_GROUP'), 'view_through_conversions'(could not support requested resources: 'ASSET_GROUP'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources."  } ],


RequestId : JWMpCN21dJv2UObgdEAfyQ




Google Ads API Forum Advisor

unread,
Nov 20, 2023, 5:46:48 PM11/20/23
to jo...@paperclicks.net, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your concern, I understand that you are unable to get response for the asset_group resource. To assist you better, please provide us with the complete API logs (request and response with request-id and request header) so that investigate this issue further.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qU6DC:ref"

Thanks,
 
Google Logo Google Ads API Team


D. H.

unread,
Nov 21, 2023, 4:14:54 AM11/21/23
to Google Ads API and AdWords API Forum
Hi, 

Are you using v15 of the API or an earlier version? Looks like metrics for asset groups were added in v15: https://ads-developers.googleblog.com/2023/10/announcing-v15-of-google-ads-api.html


I get a similar error running your query against v14 with the Python client:
[2023-11-21 17:00:00,000 - WARNING] Request made: ClientCustomerId: xxxxxxxxxx, Host: googleads.googleapis.com, Method: /google.ads.googleads.v14.services.GoogleAdsService/SearchStream, RequestId: XXXXXXX_X-XXXXXXXXXXXX, IsFault: True, FaultMessage: Cannot select or filter on the following metrics: 'all_conversions'(could not support requested resources: 'ASSET_GROUP'), 'all_conversions_value'(could not support requested resources: 'ASSET_GROUP'), 'clicks'(could not support requested resources: 'ASSET_GROUP'), 'conversions'(could not support requested resources: 'ASSET_GROUP'), 'cost_micros'(could not support requested resources: 'ASSET_GROUP'), 'impressions'(could not support requested resources: 'ASSET_GROUP'), 'interactions'(could not support requested resources: 'ASSET_GROUP'), 'view_through_conversions'(could not support requested resources: 'ASSET_GROUP'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources.

Hope this helps,

D.H.

Cantare John

unread,
Nov 21, 2023, 4:30:39 AM11/21/23
to Google Ads API and AdWords API Forum
Yes i was using v14 . Thanks!
I have another question , what workaround can i use to query with date (segment.date is not present in fields to select)

Google Ads API Forum Advisor

unread,
Nov 21, 2023, 7:46:56 AM11/21/23
to heiberge...@gmail.com, adwor...@googlegroups.com
Hi, 

Thank you for reaching out to the Google Ads API support team. 

I see that you have already raised this concern on another thread with the subject "Error on getting Metrics from Asset_group" and we have already responded there for this issue. To avoid multiple threads on the same issue, please take a look at that thread and continue the discussion on the same for further updates on the issue.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02qUGBR:ref"


Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages