Data Mismatch In SEARCH_QUERY_PERFORMANCE_REPORT

72 views
Skip to first unread message

Ruby Liao

unread,
Apr 22, 2019, 8:38:33 PM4/22/19
to AdWords API and Google Ads API Forum
Hey Team,

I got a different result when adding 'Query' attribute to pull seach query performance report.
Check the code below, the total cost for ad group id 56257520389 is 161890000. However, when I query ['Query', 'AdGroupId', 'Cost'], the cost turned out to be 159570000.

Is this expected? If not, any idea about how to fix it?

import pandas as pd

def _get_report_selector(self, name, report_type, fields):
  campaign_report
= {
   
'reportName': name,
   
'dateRangeType': 'CUSTOM_DATE',
   
'reportType': report_type,
   
'downloadFormat': 'CSV',
   
'selector': { 'fields': fields, 'dateRange': { 'min': '2019-04-19'), 'max': '2019-04-19' } } }
  return campaign_report

self.client.SetClientCustomerId('984-844-9049')
query_report = self._get_report_selector( _QUERY_DAILY_INSIGHTS_NAME, _QUERY_REPORT_TYPE, [ 'AdGroupId', 'Cost', ] )
insightsCSV = pd.read_csv(self.report_downloader.DownloadReportAsStream( report, skip_report_header=True, skip_column_header=False, skip_report_summary=True))
insightsCSV.columns = [column.replace(" ", "_") for column in insightsCSV.columns]
filtered_insight = insightsCSV.query('Ad_group_ID == 56257520389')
filtered_insight['Cost'].sum() 


Best,
Ruby

googleadsapi...@google.com

unread,
Apr 23, 2019, 2:03:07 AM4/23/19
to adwor...@googlegroups.com, AdWords API and Google Ads API Forum
Hi Ruby,

Upon impersonating the report on my test AdWords API by using the provided customer ID and by using the same fields, I wasn't able to replicate the issue as the returned cost for the ad group ID 56257520389 is 161890000. The returned cost of the API report is also matched in UI (upon mapping the report in UI). With this, you may re-try the API call and let me know if the issue still persists so I can further investigate.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/59c876a7-c225-4157-a54d-43c5e156f480%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby Liao

unread,
Apr 23, 2019, 2:13:38 AM4/23/19
to AdWords API and Google Ads API Forum
Hey Ejay,

Thanks for your reply! Just want to clarify, are you using the following fields not the one in the post? Did you try both two different field combinations?
query_report = self._get_report_selector( _QUERY_DAILY_INSIGHTS_NAME, _QUERY_REPORT_TYPE, [ 'AdGroupId', 'Cost', 'Query'] )
I retried, the issue persists.


Best,
Ying

googleadsapi...@google.com

unread,
Apr 23, 2019, 6:34:27 AM4/23/19
to adwor...@googlegroups.com, AdWords API and Google Ads API Forum
Hi Ying,

My apologies for the confusion.

The only fields that I included in the report is 'AdGroupId' and 'Cost' so the returned total cost for the ad group ID 56257520389 is 161890000.

However, could you confirm if you've used the same fields ( 'AdGroupId', 'Cost' and 'Query' fields) in the UI? I asked this because upon impersonating the report on my test API, I was able to get the 159570000 total cost. However, I tried to replicate the report in the UI by using the said three fields and I noticed that the total cost returned by API is matched with the value of UI.

With this, you may try to map the Search Query Performance Report to the Google Ads UI by following this guide (Search Terms Report section).

Please let me know if you will still notice the discrepancy between values of the UI and API so I can further investigate. Also, kindly provide a sample screenshot of the UI.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Ruby Liao

unread,
Apr 23, 2019, 1:36:38 PM4/23/19
to AdWords API and Google Ads API Forum
Hey Ejay,

Thanks for your reply! I am following the Google Ads UI but was not able to add Ad group ID to this search terms report
Screen Shot 2019-04-23 at 10.31.07 AM.png
Could you please share more details about how you get this 159570000 in UI?

And is this mismatch expected? Any idea what caused it?

Best,
Ying

googleadsapi...@google.com

unread,
Apr 24, 2019, 3:21:25 AM4/24/19
to adwor...@googlegroups.com, AdWords API and Google Ads API Forum
Hi Ying,

There should be no discrepancy between the value of UI and API. Could you confirm if you tried to only use the 'AdGroupId', 'Cost' and 'Query' fields? I asked this because when I check the fields in the provided screenshot, the fields are not matched with the API report. Please take note that when comparing the values of UI and API, you need to use the exact fields so that you will not encounter data discrepancies.

Also, you are correct that it is not possible to filter out the report by ad group ID in the Google Ads UI. However, as a workaround, you may download the report in the UI. After you downloaded the report and open it as spreadsheet, you can now filter it out using the ad group ID 56257520389 and sum the total cost.

The values in downloaded report from UI is not expressed in terms of micros. Because of this, you need to divide by 1 million the values returned by API so it will match the values of UI.

Please let me know if you have further questions.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages