Questions on Performance Reports

174 views
Skip to first unread message

Digital Ascent

unread,
Jun 2, 2020, 7:41:05 PM6/2/20
to AdWords API and Google Ads API Forum
Hello All,
We are new to Google Ads API and have a requirement to develop a batch job to get the bunch of attributes for below Performance Reports for analytics.

KEYWORDS_PERFORMANCE_REPORT
CRITERIA_PERFORMANCE_REPORT
AD_PERFORMANCE_REPORT
ADGROUP_PERFORMANCE_REPORT
CAMPAIGN_PERFORMANCE_REPORT

I have learned that the Google Ads APIs are the next generation API of Adwords. I have formed a query to get Keyword Performance Report (below). I am not sure, how do i build the similar query for rest of the reports. Any help / direction would be much appreciated. Thank you!

SELECT
ad_group_criterion.criterion_id,
segments.date,
ad_group.labels,
ad_group_criterion.final_urls,
ad_group_criterion.keyword.match_type,
ad_group.tracking_url_template,
metrics.absolute_top_impression_percentage,
metrics.active_view_impressions,
metrics.active_view_measurable_cost_micros,
metrics.active_view_measurable_impressions,
metrics.all_conversions_from_interactions_rate,
metrics.all_conversions,
metrics.all_conversions_value,
metrics.average_cost,
metrics.average_cpe,
metrics.average_cpv,
metrics.clicks,
metrics.conversions_from_interactions_rate,
metrics.conversions,
metrics.conversions_value,
metrics.cost_micros,
metrics.cost_per_all_conversions,
metrics.cost_per_conversion,
metrics.engagement_rate,
metrics.engagements,
metrics.gmail_forwards,
metrics.gmail_saves,
metrics.gmail_secondary_clicks,
metrics.impressions,
metrics.interaction_rate,
metrics.interactions,
metrics.top_impression_percentage,
metrics.value_per_all_conversions,
metrics.video_quartile_100_rate,
metrics.video_quartile_25_rate,
metrics.video_quartile_50_rate,
metrics.video_quartile_75_rate,
metrics.video_view_rate,
metrics.video_views,
metrics.view_through_conversions
FROM
keyword_view
WHERE
segments.date DURING LAST_30_DAYS
ORDER BY
ad_group_criterion.criterion_id ASC

Best Regards,
KB

Google Ads API Forum Advisor Prod

unread,
Jun 3, 2020, 9:44:13 AM6/3/20
to boeanal...@gmail.com, adwor...@googlegroups.com
Hi KB,

Here is our migration guide for reports. In it, you will see which reports types and fields map from the AdWords API to Google Ads API. Let me know if you have any issues.

Cheers,
Anthony
Google Ads API Team

ref:_00D1U1174p._5004Q20VhwV:ref

Digital Ascent

unread,
Jun 3, 2020, 7:52:25 PM6/3/20
to AdWords API and Google Ads API Forum
Hello Anthony,
Thank you for your response. I have below follow on questions.

1) I am kind of positive on the resources now. However, I am unable to find the equivalent Google Ads Resource for "CRITERIA_PERFORMANCE_REPORT". Is this same as "KEYWORDS_PERFORMANCE_REPORT"?

2) How do i validate the extracted data with Google Ads UI? Is there any documentation / URL to compare the data pulled through API with UI?

Thanks in advance!

Best Regards,
KB

Google Ads API Forum Advisor Prod

unread,
Jun 4, 2020, 9:39:28 AM6/4/20
to boeanal...@gmail.com, adwor...@googlegroups.com
Hi KB,
  1. The ad_group_criterion report is the closest to the Criteria Performance Report. However, this report contains no metrics.
  2. While there is no documentation for the mapping of Google Ads API and its UI, you can use this mapping for AdWords API reports as a reference.
Regards,

Digital Ascent

unread,
Jun 23, 2020, 3:25:41 PM6/23/20
to AdWords API and Google Ads API Forum
Hi Anthony,
Thanks for the answer. Sorry, i was in middle of completing the development rest of the reports and couldn't respond.
Please find my response and additional questions below.

1. As you said, I don't find any metrics in "ad_group_criterion" resource. Can you please clarify, is the keyword performance is same as criteria performance report as the attributes are matching?

2. When i execute the below "Ad Group Performance Report" & "Campaign Performance Report" queries, getting exception "INVALID_ARGUMENT" (below are the detailed exception for both reports). Can you please let me know what is the issue with queries? I am not getting this with "Keyword (keyword_view) & Ad Performance (ad_group_ad)"

Ad Group Performance Report Query:

SELECT 
ad_group.id, campaign.id, segments.date, ad_group.name, ad_group.type, ad_group.status, campaign.name
ad_group.tracking_url_template, ad_group.labels, metrics.absolute_top_impression_percentage, 
metrics.active_view_impressions, metrics.active_view_measurable_cost_micros, 
metrics.active_view_measurable_impressions, metrics.all_conversions_from_interactions_rate, 
metrics.all_conversions, metrics.all_conversions_value, metrics.average_cost, 
metrics.average_cpe, metrics.average_cpv, metrics.clicks, metrics.conversions_from_interactions_rate, 
metrics.conversions, metrics.conversions_value, metrics.cost_micros, metrics.cost_per_all_conversions, 
metrics.cost_per_conversion, metrics.engagement_rate, metrics.engagements, metrics.gmail_forwards, 
metrics.gmail_saves, metrics.gmail_secondary_clicks, metrics.impressions, metrics.interaction_rate, 
metrics.interactions, metrics.top_impression_percentage, metrics.value_per_all_conversions, 
metrics.video_quartile_100_rate, metrics.video_quartile_25_rate, metrics.video_quartile_50_rate, 
metrics.video_quartile_75_rate, metrics.video_view_rate, metrics.video_views, metrics.view_through_conversions 
FROM 
ad_group 
WHERE 
segments.date >= START_DATE AND 
segments.date <= END_DATE 
ORDER BY 

Ad Group Performance Report Response & Exception:

Response
--------------

Headers: Metadata(content-type=application/grpc,request-id=34M-s_ITnDxzKzB1duyWUA,date=Mon, 22 Jun 2020 23:21:37 GMT,alt-svc=h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-25=":4
43"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
string_value: "Day.day"
  }
}
errors {
  error_code {
request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
string_value: "A_ad_group__AdGroupAssociation.entity_id"
  }
}
errors {
  error_code {
request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
string_value: "AdGroupAssociation.ad_group_id"
  }
}
errors {
  error_code {
request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
string_value: "AdGroupAssociation.entity_type"
  }
}

Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.
Generic Exception: com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument.
com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument.
at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:49)

Campaign Performance Report Query:

SELECT 
campaign.id, segments.date, campaign.name, campaign.status, campaign.advertising_channel_sub_type, 
campaign.tracking_url_template, campaign.url_custom_parameters, campaign.labels, 
metrics.absolute_top_impression_percentage, metrics.active_view_impressions, metrics.active_view_measurable_cost_micros, 
metrics.active_view_measurable_impressions, metrics.all_conversions_from_interactions_rate, 
metrics.all_conversions, metrics.all_conversions_value, metrics.average_cost, metrics.average_cpe, metrics.average_cpv, 
metrics.clicks, metrics.conversions_from_interactions_rate, metrics.conversions, metrics.conversions_value, 
metrics.cost_micros, metrics.cost_per_all_conversions, metrics.cost_per_conversion, metrics.engagement_rate, 
metrics.engagements, metrics.gmail_forwards, metrics.gmail_saves, metrics.gmail_secondary_clicks, 
metrics.impressions, metrics.interaction_rate, metrics.interactions, metrics.invalid_click_rate, 
metrics.invalid_clicks, metrics.top_impression_percentage, metrics.value_per_all_conversions, 
metrics.video_quartile_100_rate, metrics.video_quartile_25_rate, metrics.video_quartile_50_rate, 
metrics.video_quartile_75_rate, metrics.video_view_rate, metrics.video_views, metrics.view_through_conversions 
FROM 
campaign 
WHERE 
segments.date >= START_DATE AND 
segments.date <= END_DATE 
ORDER BY 

Campaign Performance Report Response & Exception:

Response
--------------
 
Headers: Metadata(content-type=application/grpc,request-id=eiERLBfpRfjFnVp8MG20hg,date=Mon, 22 Jun 2020 23:25:57 GMT,alt-svc=h3-29=":443"; ma=2592000,h3-27=":443"; ma=2592000,h3-25=":4
43"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43")
Body: null
Failure message: errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    string_value: "Day.day"
  }
}
errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    string_value: "A_campaign__CampaignAssociation.entity_id"
  }
}
errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    string_value: "CampaignAssociation.campaign_id"
  }
}
errors {
  error_code {
    request_error: UNKNOWN
  }
  message: "The error code is not in this version."
  trigger {
    string_value: "CampaignAssociation.entity_type"
  }
}

Status: Status{code=INVALID_ARGUMENT, description=Request contains an invalid argument., cause=null}.
Generic Exception: com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument.
com.google.api.gax.rpc.InvalidArgumentException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument.
        at com.google.api.gax.rpc.ApiExceptionFactory.createException(ApiExceptionFactory.java:49)

Thanks in advance!

Best Regards,
KB

Google Ads API Forum Advisor Prod

unread,
Jun 24, 2020, 11:27:42 AM6/24/20
to boeanal...@gmail.com, adwor...@googlegroups.com
Hi KB,
  1. When using keyword_view, you can select fields from the ad_group_criterion resource.
  2. I did not see any issues with your queries. For your following queries and the keyword_view report, you can use the Interactive Google Ads Query Builder to see if your queries are valid. 

Digital Ascent

unread,
Jun 24, 2020, 6:11:49 PM6/24/20
to AdWords API and Google Ads API Forum
Hi Anthony,
Thanks! Please find my response.
  1. Regarding "ad_group_criterion" resource, i am good as it is kind of duplicate of Keyword Performance Report.
  2. Yes, I have used "Interactive Google Ads Query Builder" to build the query. Is there anyway to troubleshoot this problem? Please guide me.
Thanks in advance!

Best Regards,
KB

Google Ads API Forum Advisor Prod

unread,
Jun 25, 2020, 10:13:15 AM6/25/20
to boeanal...@gmail.com, adwor...@googlegroups.com
Hi KB,

For me troubleshoot, I'll need your CID. Can you please provide this to me via reply privately to author?

Thanks,

Digital Ascent

unread,
Jun 25, 2020, 7:31:45 PM6/25/20
to AdWords API and Google Ads API Forum
Hi Anthony,
As requested, I have shared the CID privately.

Thanks in advance!

Best Regards,
KB
Reply all
Reply to author
Forward
0 new messages