Re: Conversions value per cost (ROAS) - Cannot select or filter

2022-05-31 Thread Hubert Jaworski
How do I do that in Python?

Here's a snippet of how I use the Python library to send requests to the 
API:
ga_service = googleads_client.get_service("GoogleAdsService")
search_request = googleads_client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = customer['id']
search_request.query = query
search_request.summary_row_setting = googleads_client.get_type(
'SummaryRowSettingEnum').SummaryRowSetting.SUMMARY_ROW_WITH_RESULTS

stream = ga_service.search_stream(search_request)
for batch in stream:
(...)

Not quite sure how to obtain the complete logs here :(
czwartek, 26 maja 2022 o 07:48:18 UTC+2 adsapi napisaƂ(a):

> Hi Hubert,
>
> Thank you for raising your concern to the team.
>
> Upon checking our document 
> , I can 
> see that it should be supported for the said report type. However, you've 
> encountered the error where it says that the field is not compatible with 
> the said report type. Also, I tried it in the query validator and I can see 
> the same error.
>
> With this, so that I can further investigate or raise it to the team, 
> would you be able to provide the complete request 
> 
>  and response 
> 
>  logs 
> with request ID 
> 
>  and request header 
> 
>  generated 
> on your end? You can provide it via *Reply privately to author* option. 
> If this option is not available, then send it instead on this email address 
> googleadsa...@google.com.
>
> Regards,
> [image: Google Logo] 
> Ernie John 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2bDLrx:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/4aecc6fb-ab37-491a-9b34-00a801d28248n%40googlegroups.com.


Conversions value per cost (ROAS) - Cannot select or filter

2022-05-25 Thread Hubert Jaworski
Hey there!

I query the Google Ads API for some reporting metrics.
The Campaign Resource DOES list metrics.conversions_value_per_cost as 
available:
https://developers.google.com/google-ads/api/fields/v10/campaign#metrics.conversions_value_per_cost

But I get the following error:

error_code {
query_error: 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."

Here's the query:
SELECT 
segments.device, 
metrics.impressions, 
metrics.clicks, 
metrics.ctr, 
metrics.average_cpc, 
metrics.cost_micros, 
metrics.conversions, 
metrics.conversions_value, 
*metrics.conversions_value_per_cost, *
metrics.conversions_from_interactions_rate, 
metrics.search_impression_share, 
metrics.search_rank_lost_impression_share, 
metrics.search_budget_lost_impression_share 
FROM campaign 
WHERE segments.date BETWEEN '2022-05-16' AND '2022-05-22' 
AND campaign.advertising_channel_type = 'SEARCH' 
AND campaign.name LIKE "%MyPattern%"

The Google Ads UI does have this metric, so I guess I'm missing something 
here?


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/032e618e-a782-49ab-91ec-90a69b492fc2n%40googlegroups.com.