I'm trying to programatically request an Executive Report (on Campaigns) that my users usally run manually.
Following the instructions found at https://developers.google.com/doubleclick-search/v2/reference/reports/request , I can use the request_report() method succesfully if I only selected the Campaign and Clicks columns in the report:
request = service.reports().request(
body=
{
"reportScope": {
"agencyId": "xxx",
"advertiserId": "xxx"
},
"reportType": "campaign",
"columns": [
{ "columnName": "Campaign" },
{ "columnName": "Clicks" }
],
"timeRange" : {
"startDate" : "2016-07-24",
"endDate" : "2016-07-30"
},
#"filters": [ ],
"downloadFormat": "csv",
"maxRowsPerFile": 6000000,
"statisticsCurrency": "agency",
"verifySingleTimeZone": "false",
"includeRemovedEntities": "false"
}
)
but if I try to add Engine and/or Trans as columns to the report, like this:
"columns": [
{ "columnName": "Campaign" },
{ "columnName": "Engine" },
{ "columnName": "Trans" },
{ "columnName": "Clicks" }
],
I get the following error back:
googleapiclient.errors.HttpError: <HttpError 400 when requesting
https://www.googleapis.com/doubleclicksearch/v2/reports?alt=json returned
"columns[1]: Column identifier is missing or have unrecognized values. Must
include at least one of: columnName, customDimensionName, customMetricName,
savedColumnName">
I guess this means that Engine and Trans must have some other name, but I can't find any documentation for it.
Any suggestions on where I can look it up? Thank you