V6 Reporting Documentation Incorrect

189 views
Skip to first unread message

Pete Lavetsky (AdWords API Guru)

unread,
Nov 30, 2020, 11:45:25 AM11/30/20
to AdWords API and Google Ads API Forum
Hello!

We're trying to migrate a few reports from v201809 of the AdWords API to V6 of the Ads API

I'm referencing this documentation: https://developers.google.com/google-ads/api/fields/v6/campaign

My query is:

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

Google Ads API Forum Advisor Prod

unread,
Dec 2, 2020, 10:52:39 AM12/2/20
to pete.l...@gmail.com, adwor...@googlegroups.com

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

Google Logo
Abraham Williams
Google Ads API Team
 


ref:_00D1U1174p._5004Q28lroo:ref

Pete Lavetsky (AdWords API Guru)

unread,
Dec 7, 2020, 12:42:49 PM12/7/20
to AdWords API and Google Ads API Forum
Hi Abraham,

Thanks for that insight.

As stated, we're attempting to migrate the last of our reports over from AdWords API to Ads API. 

As a more basic example lets talk about migrating our ACCOUNT_PERFORMANCE_REPORT ( https://developers.google.com/google-ads/api/docs/migration/reports#account_performance )

Here's our query using the new fields from the migration documentation. Keep in mind this exact same query, using the AdWords API fields, worked. All we've done is change the fields over to the Ads API corresponding fields.

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



Pete Lavetsky (AdWords API Guru)

unread,
Dec 7, 2020, 12:58:27 PM12/7/20
to AdWords API and Google Ads API Forum
So there's no ambiguity, this is the query we were using in AdWords API:

SELECT ExternalCustomerId, Date, AdNetworkType1, Device, ConversionTypeName, ConversionCategoryName, Conversions, ConversionRate, CostPerConversion FROM ACCOUNT_PERFORMANCE_REPORT DURING LAST_30_DAYS

Google Ads API Forum Advisor Prod

unread,
Dec 8, 2020, 3:55:40 PM12/8/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

Unfortunately, when using Google Ads API, you cannot segment by conversion actions when you are using fields such as metrics.conversions_from_interactions_rate and metrics.cost_per_conversion. If you look at this page, you can see what fields can be used with segment fields. Additionally, you can use the Interactive Google Ads Query Builder to see if your report query is valid. 

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q28lroo:ref

Pete Lavetsky (AdWords API Guru)

unread,
Dec 8, 2020, 5:16:26 PM12/8/20
to AdWords API and Google Ads API Forum
Anthony,

I've been using the query builder and that's why I'm here asking if the rules Google has put in place for conversion action segments is correct.

Throw out everything I said above and just use the Interactive Google Ads Query Builder to start with customer resource and metrics.cost_micros as the first field.

With only metrics.cost_micros selected, I can't select anything for segments.conversion_action

How are we ever supposed to know the cost associated with any of our conversion_actions?

This was super achievable in AdWords API and I'm asking you to ping the engineers about this.

There must be some way to get the data in Ads API that was so easily retrievable in AdWords API

Thanks
Pete

Screen Shot 2020-12-08 at 5.09.14 PM.png

Google Ads API Forum Advisor Prod

unread,
Dec 11, 2020, 5:20:30 PM12/11/20
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

I've asked the Conversions team to take a look. I'll let you know as I hear from them.

Cheers
Anash

ref:_00D1U1174p._5004Q28lroo:ref

Pete Lavetsky (AdWords API Guru)

unread,
Feb 11, 2021, 12:57:01 PM2/11/21
to AdWords API and Google Ads API Forum
Hi Anash,

Any update on this matter?

I noticed 6.1 had some Conversion work so wondering if we're getting any closer


Thanks
Pete

Google Ads API Forum Advisor Prod

unread,
Feb 11, 2021, 5:18:31 PM2/11/21
to pete.l...@gmail.com, adwor...@googlegroups.com
Hi Pete,

We discussed this issue internally, and came to the conclusion that the Google Ads UI and Google Ads API behavior in this case is correct, so there's an upcoming change to disallow these column combinations in AdWords API. See https://ads-developers.googleblog.com/2021/01/changes-to-conversion-columns-in.html for details.

If you need more details on this change, I'll be happy to get them for you or connect you to the relevant team if required.

Thanks,
Reply all
Reply to author
Forward
0 new messages