Metrics data discrepancies between ad_group_ad and search_term_view endpoints(GAQL.

47 views
Skip to first unread message

Mohansai P

unread,
Nov 22, 2024, 5:43:53 AM11/22/24
to Google Ads API and AdWords API Forum
Hi Team,

We are trying to fetch adspend data including metrics (Impressions, Clicks, Cost, Conversions and Conversion_value) from Google Ads API and we have identified by using GAQL & python client library we can achieve this from ad_group_ad endpoint as show below.
SELECT
segments.date,
segments.device,
campaign.id,
campaign.name,
campaign.status,
campaign.advertising_channel_type,
ad_group.name,
ad_group_ad.ad.id,
ad_group_ad.ad.name,
ad_group_ad.ad.tracking_url_template,
metrics.cost_micros,
metrics.clicks,
metrics.impressions,
metrics.conversions,
metrics.conversions_value,
customer.currency_code
FROM ad_group_ad
WHERE segments.date = '2024-01-01'


Here we have another requirement is that we need to fetch search_terms data also, for that we are fetching as below
SELECT
segments.date,
segments.device,
campaign.id,
campaign.name,
campaign.status,
campaign.advertising_channel_type,
ad_group.name,
ad_group_ad.ad.id,
ad_group_ad.ad.name,
ad_group_ad.ad.tracking_url_template,
metrics.cost_micros,
metrics.clicks,
metrics.impressions,
metrics.conversions,
metrics.conversions_value,
customer.currency_code,
search_term_view.search_term
FROM search_term_view
WHERE segments.date = '2024-01-01'

But here my issue, the overall impressions, clicks, cost, conversions & conversions for 2024-01-01 is varying between ad_group_ad and search_term_view, but ideally it should not vary right?? since we introduce search term column, it should break up the various metrics into smaller parts but the aggregates should match up when without search_term column.

Example: From ad_group_ad endpoint the response as
campaign_id - 23232141
adgroup_name - Blue Spruce
ad_id - 4262288
impressions - 14
clicks - 3
cost - 2

From search_term_view endpoint the response as
campaign_id - 23232141
adgroup_name - Blue Spruce
ad_id - 4262288
search_term - 6.5 ft artificial christmas tree
impressions - 6
clicks - 1
cost - 1

campaign_id - 23232141
adgroup_name - Blue Spruce
ad_id - 4262288
search_term - artificial christmas trees
impressions - 6
clicks - 0
cost - 0

From the above example, we can observe that aggregated impressions, clicks & cost from ad_group_ad are not matching with search_term splitted impressions, clicks & cost.
missing data: 
impressions - 2
clicks - 2
cost - 1

I hope you understood, Can you please help me with this?
Thanks in advance,
Mohan.

Google Ads API Forum Advisor

unread,
Nov 22, 2024, 8:00:34 AM11/22/24
to mohansai...@gmail.com, adwor...@googlegroups.com
Hi Mohan,

Thank you for reaching out to the Google Ads API support team.

Based on the information provided, I understand that you are seeing discrepancy in metrics between the ad_group_ad and search_term_view reports using the Google Ads API. One important thing to note is that it's generally never a good practice, in the Google Ads API, to compare two different reports against each other. The reports accrue stats on different events, at different levels, etc. depending on the specific report types. At any given time, you need to consider what view you actually need for your current use case, and then use only the view that gives you those stats.

Upon checking your campaign ID (23232141), it is associated with the Google Ads account (204-227-5380). Can you confirm whether you are trying to retrieve the data using the same account? If yes, note that we have tried to fetch the data using your GAQL query and we are getting a CUSTOMER_NOT_ENABLED error. This error occurs when the customer account hasn't finished signup or has been deactivated. Upon checking the account (204-227-5380), I could see that its status is in an canceled state. Also, note that I don't see the ad_group names and ad IDs from this account (204-227-5380), so I would request you to share the uncropped UI screenshot of the Google Ads account (with visible customer ID) by highlighting the fields and metrics for which you want to retrieve using the Google Ads API. 

In order to investigate your issue further, kindly provide us with the complete API logs (request and response logs with request-id and request header) generated at your end to further assist you better. As you are using the Python client library, I would request you to enable the logging using this guide

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGlfh:ref" (ADR-00276496)

Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


Reply all
Reply to author
Forward
0 new messages