How do we get metrics related to a specific keyword using google ads api (GAQL).

83 views
Skip to first unread message

Ritesh Chandra

unread,
Jun 21, 2023, 4:52:10 AM6/21/23
to Google Ads API and AdWords API Forum
We want to make a report which includes the following fields - 
Keyword, campaign name, adgroup name, Impressions, Clicks, CTR, Cost, Conversions

We want to access metrics of an ad_group of a particular keyword but there is no way to link both ad_group table and ad_group_criterion table for a specific keyword.text. 

keyword.text can be accessed from ad_group_criterion table but its metrics cannot be pulled from that table.

But we can access metrics of each adGroup (which includes all the keyword.text of that adgroup) from ad_group table.

I have attached an example structure of the two tables according to our knowledge and we are also attaching the required schema for report we want to make.

I would greatly appreciate a prompt response. Thank you.
report schema.png
structure.jpg

Google Ads API Forum Advisor

unread,
Jun 22, 2023, 7:35:22 AM6/22/23
to riteshch...@gmail.com, adwor...@googlegroups.com

Hi,

Thanks for reaching out to Google Ads API Forum.

With regards to your concern, I would recommend using the keyword_view report, as this report has the attributed resources of accessible_bidding_strategy, ad_group, ad_group_criterion, bidding_strategy, campaign, customer. This report also consists of the metrics that you mentioned. You may see a sample query below. 

SELECT 
  keyword_view.resource_name, 
  campaign.name, 
  ad_group.name, 
  metrics.impressions, 
  metrics.cost_micros, 
  metrics.clicks, 
  metrics.ctr, 
  metrics.conversions 
FROM keyword_view 

However, if this is not what you are looking for, then please note that Google Ads API mirrors the Google Ads UI. Meaning by using the Google Ads API, you can get and manage the data that you are seeing in the UI. With that being said, can you provide us with the full (not cropped) and non-redacted screenshot of the Google Ads UI data that you want to do in Google Ads API? This is for us to be able to perform and to replicate the data on our side.

You may then send the requested information via the Reply privately to the author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Links included in this email:

 
This message is in relation to case "ref:_00D1U1174p._5004Q2mVv96:ref"

Thanks,
 
Google Logo Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages