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)


On Tuesday, November 21, 2023 at 10:14:54 AM UTC+1 D. H. wrote:

> 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
>
> And: https://developers.google.com/google-ads/api/fields/v15/asset_group
>
> 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.
> On Tuesday, November 21, 2023 at 12:09:43 AM UTC+8 Cantare John wrote:
>
>> 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 <http://campaign.id>, asset_group.id 
>> <http://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
>>
>>
>>
>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bc844078-9561-46de-9c4a-bb5c7bc8ec19n%40googlegroups.com.
  • Er... Cantare John
    • ... D. H.
      • ... Cantare John
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to