So when I download the adgroup performance report from the API, I got fewer
ad groups than when I download from the interface. Did I do something
wrong? The code is as follow:
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
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 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/5d7aa290-191b-4568-a28a-be1b65202607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.