Reputation: 11
AdSense community!
We integrate with Google AdSense and we came across one issue, where we don't receive any values for Channel (custom_channel_name) metrics from API.
Request:
GET /adsense/v1.4/accounts/pub-1814736887286790/reports?startDate=2021-01-30&endDate=2021-03-10&dimension=CUSTOM_CHANNEL_NAME&metric=PAGE_VIEWS HTTP/1.1
Host: www.googleapis.com
Authorization: Bearer ya29.a0AfH6SMDhQM2OppSUprzHiS-mT0FI_ku36J9HME1D0W0nXhTHs4vvfkwIelv8mVVed4Pu_xGzrFbbefkeKCRue-X-RR8fgZhevYF1r6Eo6-VymNnJAkNoFDMwAEeAqvvUFiTQh3iyMAffLj0fJqK1yU2JrRXgQQ
Response:
{
"kind": "adsense#report",
"totalMatchedRows": "0",
"headers": [
{
"name": "CUSTOM_CHANNEL_NAME",
"type": "DIMENSION"
},
{
"name": "PAGE_VIEWS",
"type": "METRIC_TALLY"
}
],
"totals": [
"",
null
],
"averages": [
"",
null
],
"startDate": "2021-01-30",
"endDate": "2021-03-10"
}
We did not find in the API documentation that the metric would no longer be supported. Maybe you know what the problem is and help us solve it?
Thank you for your help!
Regards, Ziga
Upvotes: 0
Views: 115
Reputation: 199
The custom channel dimension is still supported in the API. Keep in mind that if a report row would have all zeros, then the row is not returned by the API. I would recommend you check this report in the UI to compare the results.
Upvotes: 0