How to get search query conversions of a specific conversion type

56 views
Skip to first unread message

Yao Liu

unread,
Jun 9, 2021, 8:10:20 PM6/9/21
to AdWords API and Google Ads API Forum
Is it possible to do something like this:

 var queryReport = AdWordsApp.report(
    "SELECT * FROM (SELECT CampaignName, CampaignId, AdGroupId, AdGroupName, Query, Clicks FROM " + 
    "SEARCH_QUERY_PERFORMANCE_REPORT WHERE ... ) lt " +
     "LEFT OUTER JOIN (SELECT CampaignName, CampaignId, AdGroupId, AdGroupName, Query, AllConversions " +
      "FROM SEARCH_QUERY_PERFORMANCE_REPORT WHERE ConversionTypeName = 'First Time Purchase' AND ...) rt " +
     "ON lt.CampaignId = rt.CampaignId AND lt.AdGroupId = rt.AdGroupId AND lt.Query = rt.Query"
     )

I want each query's clicks as well as "First Time Purchase" conversions. I can't directly use Conversions or AllConversions because each campaign might have optimized different conversion actions in the past.

Yao Liu

unread,
Jun 10, 2021, 1:57:19 PM6/10/21
to AdWords API and Google Ads API Forum
Hello, 

I am new to Google Ads API still and trying to understand if joins like demonstrated below are allowed in order to create the table we want. Hope to get some clarification here.

Thanks!
Yao

Google Ads API Forum Advisor

unread,
Jun 11, 2021, 2:36:42 AM6/11/21
to adwor...@googlegroups.com
Hi Yao,

Thanks for raising your concern.

Unfortunately, joining 2 report types directly in the API is not possible. You will need to download the reports and create a process on your end instead to join the data of different report types.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


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