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
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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.