Performance Report is a function of confirming performance of Campaign, Ad Group, Ad, etc.
Customizing is possible when creating report, like setting item display, performance period, etc.
Creating report will be more easier by using the recommended report setting.
Report functions supported in Campaign Management Tool are also available from API.
To display the performance report, use the two services below from Display Ads API.
ReportDefinitionService can retrieve and add/download the report.
This is introducing the process from creating to downloading the report, to retrieve Performance Report, using Display Ads API.
Use getReportFields of ReportDefinitionService. Retrieving list of available report fields by designating ReportCategory. Each report fields encapsulate the Field Name, Display Name, and XML Attribute
{
"type": "AD"
}
I omit a part.
{
"errors": null,
"rid": "6ef3dba169e73bb6a11e5ddc85652f70",
"rval": {
"errors": null,
"fields": [
{
"displayFieldNameEN": "Account ID",
"displayFieldNameJA": "アカウントID",
"fieldName": "ACCOUNT_ID",
"fieldType": "LONG",
"filterable": true,
"impossibleCombinationFields": null,
"xmlAttributeName": "accountID"
},
...
],
"operationSucceeded": true
}
}
Use add of ReportDefinitionService.
{
"accountId": 111111,
"operand": [
{
"fields": [
"ACCOUNT_ID",
"ACCOUNT_NAME",
"CAMPAIGN_ID",
"CAMPAIGN_NAME",
"ADGROUP_ID",
"ADGROUP_NAME",
"AD_ID",
"AD_NAME",
"AD_TYPE",
"URL_ID",
"URL_NAME",
"PREF_ID",
"PREF_NAME",
"CITY_ID",
"CITY_NAME",
"WARD_ID",
"WARD_NAME",
"GENDER",
"AGE",
"MONTH",
"DAY"
],
"filters": [
{
"field": "ACCOUNT_ID",
"filterOperator": "NOT_EQUALS",
"values": [
"100"
]
}
],
"reportCompressType": "ZIP",
"reportDateRangeType": "LAST_7_DAYS",
"reportDownloadEncode": "UTF8",
"reportDownloadFormat": "CSV",
"reportLanguage": "EN",
"reportName": "test report 01",
"sortFields": [
{
"field": "ACCOUNT_ID",
"reportSortType": "ASC"
}
]
}
]
}
{
"errors": null,
"rid": "6ef3dba169e73bb6a11e5ddc85652f70",
"rval": {
"values": [
{
"errors": null,
"operationSucceeded": true,
"reportDefinition": {
"accountId": 111111,
"completeTime": null,
"dateRange": null,
"fields": [
"ACCOUNT_ID",
"ACCOUNT_NAME",
"CAMPAIGN_ID",
"CAMPAIGN_NAME",
"ADGROUP_ID",
"ADGROUP_NAME",
"AD_ID",
"AD_NAME",
"AD_TYPE",
"URL_ID",
"URL_NAME",
"PREF_ID",
"PREF_NAME",
"CITY_ID",
"CITY_NAME",
"WARD_ID",
"WARD_NAME",
"GENDER",
"AGE",
"MONTH",
"DAY"
],
"filters": [
{
"field": "ACCOUNT_ID",
"filterOperator": "NOT_EQUALS",
"values": [
"100"
]
}
],
"reportCompressType": "ZIP",
"reportDateRangeType": "LAST_7_DAYS",
"reportDownloadEncode": "UTF8",
"reportDownloadFormat": "CSV",
"reportJobStatus": "WAIT",
"reportJobErrorDetail": null,
"reportJobId": 222222,
"reportLanguage": "EN",
"reportName": "test report 01",
"requestTime": "20211224185454",
"reportSkipColumnHeader": "FALSE",
"reportSkipReportSummary": "FALSE",
"reportDecimalPartDisplayType": "SIMPLE_DISPLAY",
"reportTypeCondition": null,
"sortFields": [
{
"field": "ACCOUNT_ID",
"reportSortType": "ASC"
}
]
}
}
]
}
}
Use get of ReportService. Can confirm the report creation status.
Also, when jobStatus of response is “completed”, go to 4.
{
"accountId": 111111,
"numberResults": 10,
"reportJobIds": [
222222
],
"startIndex": 1
}
{
"errors": null,
"rid": "1abd04462d335b6f9061b4837aa7a5c7",
"rval": {
"totalNumEntries": 1,
"values": [
{
"errors": null,
"operationSucceeded": true,
"reportDefinition": {
"accountId": 111111,
"completeTime": "20211224185457",
"dateRange": null,
"fields": [
"ACCOUNT_ID",
"ACCOUNT_NAME",
"CAMPAIGN_ID",
"CAMPAIGN_NAME",
"ADGROUP_ID",
"ADGROUP_NAME",
"AD_ID",
"AD_NAME",
"AD_TYPE",
"URL_ID",
"URL_NAME",
"PREF_ID",
"PREF_NAME",
"CITY_ID",
"CITY_NAME",
"WARD_ID",
"WARD_NAME",
"GENDER",
"AGE",
"MONTH",
"DAY"
],
"filters": [
{
"field": "ACCOUNT_ID",
"filterOperator": "NOT_EQUALS",
"values": [
"100"
]
}
],
"reportCompressType": "ZIP",
"reportDateRangeType": "LAST_7_DAYS",
"reportDownloadEncode": "UTF8",
"reportDownloadFormat": "CSV",
"reportJobStatus": "COMPLETED",
"reportJobErrorDetail": null,
"reportJobId": 222222,
"reportLanguage": "EN",
"reportName": "test report 01",
"requestTime": "20211224185454",
"reportSkipColumnHeader": "FALSE",
"reportSkipReportSummary": "FALSE",
"reportDecimalPartDisplayType": "SIMPLE_DISPLAY",
"reportTypeCondition": null,
"sortFields": [
{
"field": "ACCOUNT_ID",
"reportSortType": "ASC"
}
]
}
}
]
}
}
Use download of ReportDefinitionService.
Download report from ReportList.
{
"accountId": 111111,
"reportJobId": 222222
}
If no date, it looks like this.
result of unzip.
Account ID,Account Name,Campaign ID,Campaign Name,Ad Group ID,Ad Group Name,Ad ID,Ad Name,Ad Type,Destination URL ID,Destination URL,Prefecture ID,Prefectures,City ID,City,Ward ID,Ward,Gender,Age,Month,Daily
Total,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--,--