SELECT segments.conversion_action FROM ad_group_ad

82 views
Skip to first unread message

暐陳

unread,
Mar 30, 2020, 3:49:51 AM3/30/20
to AdWords API and Google Ads API Forum
I want to make Automation Report to pull data from platform, and I need the field of conversion_action_name to show in my report.
My Query is look like that:

    query = ('SELECT customer.id, customer.descriptive_name, customer.currency_code, \
              campaign.id, campaign.name, campaign.status, campaign.serving_status, \
              ad_group.id, ad_group.name, ad_group_ad.ad.id, ad_group_ad.ad.name, ad_group_ad.ad.final_urls, '
             'segments.date , segments.ad_network_type, segments.conversion_action_name, '
             'metrics.impressions, metrics.ctr, metrics.clicks, metrics.conversions_from_interactions_rate, metrics.conversions, \
              metrics.cost_per_conversion, metrics.view_through_conversions, \
              metrics.cost_micros, metrics.average_cost, metrics.average_cpm, metrics.average_cpc '
             'FROM ad_group_ad ' 
             'WHERE segments.date DURING YESTERDAY '
             'ORDER BY metrics.impressions DESC '
             'LIMIT 100')

I got the error message told me that :

 failed with status "INVALID_ARGUMENT" and includes the following errors:

Error with message "Cannot select the following segments because at least one unsupported metric is found in SELECT or WHERE clause: 'segments.conversion_action_name'(unsupported metrics: 'ctr', 'cost_micros', 'average_cpc', 'clicks', 'conversions_from_interactions_rate', 'impressions', 'average_cost', 'average_cpm', 'cost_per_conversion').".


However, as I know conversion_action and conversion_action_type is selectable and can be use as an "segment" while I put ad_group_ad  in FROM clause.

螢幕截圖 2020-03-30 15.38.18.png


Furthermore, even though I removed the filed system said that is unsupported metric, I still got error message in different dimension.
Error with message "The following field must be present in SELECT clause: 'metrics.impressions'.". 

That is pretty confused me cuz metrics.impressions is one of conversion_action unsupported filed, very weird, error message told me metrics.impressions is unsupported field if I put conversion_action or conversion_action_name in select clause,  on the other hand, I would got another error message of this filed must included in the select clause if I removed metrics.impressions from my select clause. 


Plz help me figure out, thank you sincerely if you can really help me.


Google Ads API Forum Advisor Prod

unread,
Mar 30, 2020, 3:21:19 PM3/30/20
to wasd...@gmail.com, adwor...@googlegroups.com

Hi Wei,

Thank you for reaching out. You are receiving this error "The following field must be present in SELECT clause: 'metrics.impressions'." as you had put 'ORDER BY metrics.impressions DESC ' in your query. If you remove this ORDER BY clause, the issue should be fixed. Please let me know if you have any further concerns.

Thanks and regards,
Xiaoming, Google Ads API Team



 

ref:_00D1U1174p._5001UZV7gI:ref

暐陳

unread,
Mar 30, 2020, 10:59:22 PM3/30/20
to AdWords API and Google Ads API Forum
Thank you! You solved one of my problem. Can't believe I didn't notice the order clause lol.
However, I want to make a report has necessary columns like imps clicks ctr cvr ...etc, and combine with coversion_action_name.
Cuz we set some tailored conversion in the platform when we run ads like Custom_1, Custom_2, Custom_3, I want to demonstrate which conversion match to which Custom_conversion in the report.

Plz help me to figure out that, thank you sincerely.   

Google Ads API Forum Advisor Prod

unread,
Mar 31, 2020, 1:38:21 PM3/31/20
to wasd...@gmail.com, adwor...@googlegroups.com

Hi Wei,

Thank you for reaching out. The fields 'ctr', 'cost_micros', 'average_cpc', 'clicks', 'conversions_from_interactions_rate', 'impressions', 'average_cost', 'average_cpm', 'cost_per_conversion' are not yet supported when you have segments.conversion_action_name in the SELECT clause. I have submitted a feature request to support these fields when you have segments.conversion_action_name in the SELECT clause. Please keep an eye on our blog for the announcements and updates on new releases.



Thanks and regards,
Xiaoming, Google Ads API Team


 

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