Retrieve All Conversions by Conversion Action Name

35 views
Skip to first unread message

John Zupancic

unread,
Jun 3, 2019, 1:35:38 PM6/3/19
to AdWords API and Google Ads API Forum
Hello,

I am trying to retrieve the number of conversions in a campaign from a specific conversion action in the Google API v1.0.0 however I am getting an INVALID_ARGUMENT error. Here is my query:

SELECT metrics.all_conversions
FROM campaign
WHERE campaign.name = 'My Campaign Name' AND segments.conversion_action_name = 'My Conversion Action'

How can I get this working?

I can confirm that the following will get me the all conversions column but it's missing the breakdown by conversion action name:

SELECT metrics.all_conversions
FROM campaign
WHERE campaign.name = 'My Campaign Name' 

Thank you,
John

John Zupancic

unread,
Jun 7, 2019, 8:39:04 AM6/7/19
to AdWords API and Google Ads API Forum
Hello Google,

This question has still gone unanswered.

Thank you,
John

Google Ads API Forum Advisor Prod

unread,
Jun 7, 2019, 3:17:01 PM6/7/19
to adwor...@googlegroups.com
Hi John,

Apologies for the delay. I looked at this case, and your query returns the following error when run against my account:

Failure: { "errors": [ { "errorCode": { "queryError": "EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE" }, "message": "The following field must be present in SELECT clause: 'segments.conversion_action_name'." } ] }

If you add segments.conversion_action_name as a field in your query, it should work for you.

Cheers
Anash

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