Ad Group Performance report download missing data

9 views
Skip to first unread message

angie...@simplisafe.com

unread,
Jan 2, 2018, 6:16:20 PM1/2/18
to AdWords API Forum
So I found that when I download the adgroup performance report in the API, it includes fewer ad groups than when I download from the interface. Did I do something wrong? 

The code is as follow; I downloaded the report and put it into a pandas dataframe:

def downloadAdGroupReport(start_date, end_date):
output = io.StringIO()

# Initialize appropriate service.
adwords_client = adwords.AdWordsClient.LoadFromStorage()

report_downloader = adwords_client.GetReportDownloader(version='v201705')

# Create report query.
report_query = ('SELECT AdGroupId, AdGroupName, CampaignName, CpcBid, Week, Device, Clicks, AllConversions '
'FROM ADGROUP_PERFORMANCE_REPORT '
#'WHERE AdGroupStatus IN [ENABLED] '
'DURING '+start_date+','+end_date)

# Write query result to output file
report_downloader.DownloadReportWithAwql(
report_query,
'CSV',
output,
client_customer_id='XXX-XXX-XXXX', # denotes which adw account to pull from
skip_report_header=True,
skip_column_header=False,
skip_report_summary=True,
include_zero_impressions=False)


output.seek(0)

df = pd.read_csv(output)

return df
Reply all
Reply to author
Forward
0 new messages