dateRange for CAMPAIGN_PERFORMANCE_REPORT is not letting me put custom_date

16 views
Skip to first unread message

g...@loopapps.com

unread,
Jun 22, 2018, 2:44:47 AM6/22/18
to AdWords API and Google Ads API Forum
dateRange for CAMPAIGN_PERFORMANCE_REPORT is not letting me put custom_date:
What is the correct way to format custom date? Am I formatting it wrong?

report2 = {
'reportName': 'CAMPAIGN_PERFORMANCE_REPORT',
'dateRangeType': 'CUSTOM_DATE',
'dateRange': {
'min': '20180612',
'max': '20180613'
},
'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
'downloadFormat': 'CSV',
'selector': {
'fields': ['CampaignId',
'CampaignName',
'AverageCpm',
'Ctr']
}
}

Dannison Yao (AdWords API Team)

unread,
Jun 22, 2018, 4:23:36 AM6/22/18
to AdWords API and Google Ads API Forum
Hi,

Upon investigation, the code you provided is correct and is supposed to work. Could you further explain the issue you are encountering by providing screenshots or any error messages so I could have a better look on this? You may use the reply privately to author when responding with these details.

Regards,
Dannison
AdWords API Team

Dannison Yao (AdWords API Team)

unread,
Jun 25, 2018, 1:48:36 AM6/25/18
to AdWords API and Google Ads API Forum
Hi,

Thanks for providing the logs privately. Let me respond in this public thread so other developers in the forum can refer to this in the future. Since the dateRange is basically part of the Selector, could you try generating the report again but by following the code below?

report2 = {
    'reportName': 'CAMPAIGN_PERFORMANCE_REPORT',
    'dateRangeType': 'CUSTOM_DATE',
    'reportType': 'CAMPAIGN_PERFORMANCE_REPORT',
    'downloadFormat': 'CSV',
    'selector': {
'fields': ['CampaignId',
           'CampaignName',
           'AverageCpm',
           'Ctr'],
 'dateRange': {
        'min': '20180612',
        'max': '20180613'
}
    }
}

Let me know how this goes.
Reply all
Reply to author
Forward
0 new messages