RE: How to access "Selectable With" metrics for a campaign through the Ads API

273 views
Skip to first unread message

Google Ads API Forum Advisor Prod

unread,
May 29, 2019, 4:28:31 AM5/29/19
to adwor...@googlegroups.com
Hi,

You can refer to this documentation and refer to the Metrics dropdown as to know which ones you can include when querying your campaign.

You may note however, that there are certain combinations also of metrics and segments that are prohibited. In order to ensure that the fields you are selecting are compatible, you can click on those fields (ex. metrics.all_conversions) and refer to the Selectable With dropdown to know which fields you can select them with.

I hope this helps.

Thanks and regards,
Peter
Google Ads API Team

ref:_00D1U1174p._5001UAqv16:ref

3D

unread,
May 29, 2019, 10:46:37 AM5/29/19
to AdWords API and Google Ads API Forum
Sending links to poorly written, unclear documentation is not helpful and I was really expecting more.  Do you think the first thing someone does when they have a question is post a question to a Google group? 
NO, I have gone through all of the documentation for the Ads API.  I have read these docs before, they do not help...  

The documents claim that 'campaign' and 'metrics.all_conversions_from_store_visit' are able 'selectable with' each other.  However when you try to select them both together with an AWQL query it throws the error "Cannot select or filter on the following metrics: 'all_conversions_from_store_visit'(could not support requested resources: 'CAMPAIGN'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources."

If you have any insight into this please send an example or a reply that's actually helpful.  If you have no experience using the API and are only capable of regurgitating documentation links just ignore this post.  I need answers, not links to useless docs.

Not Impressed.

3D

unread,
May 29, 2019, 3:32:49 PM5/29/19
to AdWords API and Google Ads API Forum
Can you PLEASE give an example of how 'campaign' and 'metrics.all_conversions_from_store_visit' are "Selectable With" each other? 
( Artifacts (Resources, segments, or metrics) that can be used in the same SELECT clause: ) 

Using them in the same select statement like the docs say throws an error.  



please respond...




On Wednesday, May 29, 2019 at 3:28:31 AM UTC-5, adsapiforumadvisor wrote:

Google Ads API Forum Advisor Prod

unread,
May 30, 2019, 11:14:19 AM5/30/19
to adw...@threedeepmarketing.com, adwor...@googlegroups.com
Hello,

Thanks for bringing this issue up, and apologies for the inconsistencies you've hit between the documentation and the API behavior. In this case it seems that either the documentation is incorrect, or you've hit a bug in the API. I'm going to look into whether metrics.all_conversions_from_store_visits should be selectable with campaigns, as the documentation says. If for some reason it should not be selectable I'll have the documentation updated to reflect that behavior and will send along information as to why the two resources aren't selectable together, otherwise I will file a bug to have the issue fixed.

Best,
Ben Karl, Google Ads API Team

ref:_00D1U1174p._5001UAqv16:ref

Google Ads API Forum Advisor Prod

unread,
May 30, 2019, 3:07:33 PM5/30/19
to adw...@threedeepmarketing.com, adwor...@googlegroups.com
Hello Again,

I looked into this for you and wanted to clarify something about our documentation, (which I agree is not as straightforward as it could be when describing fields and resources that are selectable together). For example the campaign resource has a Selectable With list, with the description, "Artifacts (Resources, segments, or metrics) that can be used in the same SELECT clause." There's also the Metrics list, with the description, "Metrics that can be selected when this resource is specified in the FROM clause." Based on the query you shared earlier it seems like you want to reference the Metrics list, which does not include metrics.all_conversions_from_store_visit, so that's why you're receiving an error.

metrics.all_conversions_from_store_visit are selectable from extension_feed_item, and since you can use metrics.all_conversions_from_store_visit and campaign in the same SELECT clause I believe you should be able to do something like:

SELECT
  metrics.all_conversions_from_store_visit,
  campaign.id
FROM extension_feed_item
WHERE campaign.id = "< xyz >"

I'm not sure if you've already seen it, but we have a great interactive resource to help build queries. Take a look here.

I hope that helps, please let me know if you have any other questions or trouble with this query.

Best,
Ben, Google Ads API Team

ref:_00D1U1174p._5001UAqv16:ref
Reply all
Reply to author
Forward
0 new messages