| report_job = { | |
| 'reportQuery': { | |
| 'dimensions': ['ORDER_ID', 'ORDER_NAME'], | |
| 'dimensionAttributes': ['ORDER_TRAFFICKER', 'ORDER_START_DATE_TIME', | |
| 'ORDER_END_DATE_TIME'], | |
| 'statement': filter_statement, | |
| 'columns': ['AD_SERVER_IMPRESSIONS', 'AD_SERVER_CLICKS', | |
| 'AD_SERVER_CTR', 'AD_SERVER_CPM_AND_CPC_REVENUE', | |
| 'AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM'], | |
| 'dateRangeType': 'CUSTOM_DATE', | |
| 'startDate': {'year': start_date.year, | |
| 'month': start_date.month, | |
| 'day': start_date.day}, | |
| 'endDate': {'year': end_date.year, | |
| 'month': end_date.month, | |
| 'day': end_date.day} | |
| } | |
| } |
So from the doc, it looks like 'startDate' and 'endDate' need to be of the type 'Date'.
source: https://developers.google.com/doubleclick-publishers/docs/reference/v201602/ReportService.Date