缺少日期
在 AdSense Management API 執行每日報表時,不管傳回的資料為何,系統每天可能都會逐列顯示一個資料列。不過,在某些情況下,由於要求類型未記錄到任何事件,因此某一天可能不會傳回資料。
維度:DATE
指標:CLICKS
、EARNINGS
回應:
{
"totalMatchedRows": "4",
"headers": [
{ "name": "DATE", "type": "DIMENSION" },
{ "name": "CLICKS", "type": "METRIC_TALLY" },
{ "name": "EARNINGS", "type": "METRIC_CURRENCY", "currency": "USD" }
],
"rows": [
{ "cells":
[ {"value": "2014-01-08"}, {"value": "3"}, {"value": "0.41"} ],
[ {"value": "2014-01-09"}, {"value": "5"}, {"value": "0.49"} ],
[ {"value": "2014-01-12"}, {"value": "2"}, {"value": "0.19"} ],
[ {"value": "2014-01-13"}, {"value": "1"}, {"value": "0.03"} ]
}
],
"totals": {
"cells": [
{}, {"value": "13"}, {"value": "1.12"}
]
},
"averages": {
"cells": [
{}, {"value": "2"}, {"value": "0.28"}
]
},
"startDate": {"year": 2014, "month": 1, "day": 8},
"endDate": {"year": 2021, "month": 1, "day": 13}
}
如您所見,由於沒有任何點擊或收益事件,因此系統並未傳回 2014-01-10 或 2014-01-11 的資料列。
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-09-09 (世界標準時間)。
[null,null,["上次更新時間:2024-09-09 (世界標準時間)。"],[[["Daily AdSense reports may not contain a row for every date if there were no clicks or earnings on that specific day."],["The example response demonstrates missing rows for dates (2014-01-10 and 2014-01-11) with no click or earning events."],["If you specify a date range in your report, be aware you may get an incomplete set of dates back depending on activity."],["The report includes totals and averages for clicks and earnings over the specified date range."]]],["The AdSense Management API daily report may not return data for every day in a specified range. The `DATE` dimension, along with `CLICKS` and `EARNINGS` metrics, can result in missing rows. If no events of the requested type occur on a given day, no data is logged. For example, the provided data from January 8th to 13th, 2014, has no entries for January 10th and 11th because there were no clicks or earnings on those days. The total matched rows indicate 4 days of activity.\n"]]