Getting an error while fetching metrics.conversions_value_per_cost from Campaign

79 views
Skip to first unread message

Pankaj Kumar Chibhrani

unread,
Sep 25, 2020, 1:39:06 AM9/25/20
to AdWords API and Google Ads API Forum
I am getting an error while fetching the metrics from campaign.

[
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT",
"details": [
{
"errors": [
{
"errorCode": {
"queryError": "PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE"
},
"message": "Cannot select or filter on the following metrics: 'conversions_value_per_cost'(could not support requested resources: 'CAMPAIGN'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources."
}
]
}
]
}
}
]

Google Ads API Forum Advisor Prod

unread,
Sep 25, 2020, 10:29:36 AM9/25/20
to pankaj.c...@successive.tech, adwor...@googlegroups.com

Hi Pankaj,

Thank you for reaching out. If you go to the campaign resource and select “Yes, it is” for question “Is campaign specified in the FROM clause of your query?” you would find metrics.conversions_value_per_cost is not in the Metrics list. This means you could not query the metrics.conversions_value_per_cost if you specify campaign in the FROM clause of your query. 

Thanks and regards,
Xiaoming, Google Ads API Team


Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q25WniY:ref

cv

unread,
Dec 8, 2020, 4:59:22 AM12/8/20
to AdWords API and Google Ads API Forum
Hello Xiaoming,

If I need to get this values at campaign level how I could use same?

conversions_value_per_cost
all_conversions_value_per_cost
message_chat_rate
message_impressions
message_chats

Which FROM clause I need to use to get those?

Thanks

Google Ads API Forum Advisor Prod

unread,
Dec 8, 2020, 5:05:07 PM12/8/20
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. When you specify campaign in the FROM clause of your query, these metrics won’t be available and this is expected behavior. 



Thanks and regards,
Xiaoming, Google Ads API Team

 

cv

unread,
Dec 8, 2020, 11:11:23 PM12/8/20
to AdWords API and Google Ads API Forum
Hi Xiaoming,

Yes, That I understood this is expected behaviour.
But If I need to get those fields what could be form clause? Or it wont require to have FROM clause?

Please guide how I can fetch those fields?

Thanks,

Google Ads API Forum Advisor Prod

unread,
Dec 9, 2020, 4:22:00 PM12/9/20
to chirag....@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out. You could query conversions_value_per_cost and all_conversions_value_per_cost from keyword_view resource or ad_group_ad_asset_view resource. You could query message_chat_rate, message_impressions and message_chats from extension_feed_item resource.



Thanks and regards,
Xiaoming, Google Ads API Team

Reply all
Reply to author
Forward
0 new messages