select customer.id, campaign.id, segments.date, segments.ad_network_type, segments.conversion_action_category, metrics.conversions, segments.conversion_action_name, metrics.cost_per_conversion, metrics.conversions_from_interactions_rate from campaign where segments.date DURING LAST_30_DAYS
My error is:
Failure message: errors {
error_code {
query_error: PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE
}
message: "Cannot select the following segments because at least one unsupported metric is found in SELECT or WHERE clause: \'segments.conversion_action_category\'(unsupported metrics: \'conversions_from_interactions_rate\', \'cost_per_conversion\'), \'segments.conversion_action_name\'(unsupported metrics: \'conversions_from_interactions_rate\', \'cost_per_conversion\')."
}
When I reference the above V6 documentation, and I select "Yes, it is" for is Campaign in the FROM clause, all of the fields referenced above show as available to select at the same time ... ie. "This page shows all metrics and segments that can be put in the same SELECT clause as the fields of campaign."
So, is the documentation incorrect or is the error message incorrect?
Thanks
Pete
Hello Pete,
Thank you for reaching out to Google Ads API support.
The PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE QueryError occurs when a field in the SELECT clause is not selectable with another field in the SELECT (or WHERE) clause. This is a different requirement than when "campaign" is specified in the FROM clause.
You can see the fields/resources segments.conversion_action_category is compatible with by expanding "selectable with". In your query "segments.conversion_action_category" and "segments.conversion_action_name" are not selectable with "metrics.conversions_from_interactions_rate" or "metrics.cost_per_conversion" in the same SELECT clause.
Please let us know if you have any further questions.
Regards,
Abraham
|
||||||
query: "select customer.id, segments.date, segments.ad_network_type, segments.device, segments.conversion_action_name, segments.conversion_action_category, metrics.conversions, metrics.conversions_from_interactions_rate, metrics.cost_per_conversion from customer where segments.date DURING LAST_30_DAYS "
And we get the same PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE error, which as you've pointed out is a valid error.
Just to confirm, specific field combinations that worked in the AdWords API no longer work in the Ads API correct?
Assuming the above is true, how are we to construct a query that will allow us to get metrics.conversions_from_interactions_rate and metrics.cost_per_conversion segmented by their segments.conversion_action_name or segments.conversion_action_category?
ie. how do we get Google to tell us our Cost per Conversion for specific Conversion Action names or Conversion Action categories?
Thanks
Pete
|
||||||