即時資料

如需本資源的方法清單,請見本頁結尾。

資源表示法

特定資料檢視 (設定檔) 的即時資料。

{
  "kind": "analytics#realtimeData",
  "id": string,
  "query": {
    "ids": string,
    "dimensions": string,
    "metrics": [
      string
    ],
    "sort": [
      string
    ],
    "filters": string,
    "max-results": integer
  },
  "totalResults": integer,
  "selfLink": string,
  "profileInfo": {
    "profileId": string,
    "accountId": string,
    "webPropertyId": string,
    "internalWebPropertyId": string,
    "profileName": string,
    "tableId": string
  },
  "columnHeaders": [
    {
      "name": string,
      "columnType": string,
      "dataType": string
    }
  ],
  "totalsForAllResults": {
    (key): string
  },
  "rows": [
    [
      string,
      string
    ]
  ]
}
資源名稱 說明 附註
kind string 資源類型。
id string 此資料回應的專屬 ID。
query object 即時資料要求查詢參數。
query.ids string 不重複的資料表 ID。
query.dimensions string 即時維度清單。
query.metrics[] list 即時指標清單。
query.sort[] list 根據即時資料排序的維度或指標清單。
query.filters string 以半形逗號分隔的維度或指標篩選器清單。
query.max-results integer 每頁結果數量上限。
totalResults integer 查詢的資料列總數,無論回應中的列數為何。
profileInfo object 用於要求即時資料的資料檢視 (設定檔) 的資訊。
profileInfo.profileId string 資料檢視 (設定檔) ID。
profileInfo.accountId string 此資料檢視 (設定檔) 所屬的帳戶 ID。
profileInfo.webPropertyId string 此資料檢視 (設定檔) 所屬的網站資源 ID。
profileInfo.internalWebPropertyId string 此資料檢視 (設定檔) 所屬網站資源的內部編號。
profileInfo.profileName string 資料檢視 (設定檔) 名稱。
profileInfo.tableId string 資料檢視 (設定檔) 的資料表 ID。
columnHeaders[] list 這個標題會列出維度名稱後方的維度名稱。維度和指標的順序與要求中指定的順序相同。
columnHeaders[].name string 資料欄名稱。
columnHeaders[].columnType string 欄類型。DIMENSION 或 METRIC。
columnHeaders[].dataType string 資料類型。維度欄標題的資料類型只有「STRING」。指標欄標題含有指標值的資料類型,例如 INTEGER、DOUBLE、CURRENCY 等。
totalsForAllResults object 所要求指標在所有結果中的總值,而不只是此回應中傳回的結果。指標總數的順序與要求中指定的指標順序相同。
totalsForAllResults.(key) string 指標總值的鍵/值組合。鍵是指標名稱,值則是該指標的總值。
rows[] list 即時資料列,其中每一列都包含維度值清單,後面接著指標值。維度和指標的順序與要求中指定的順序相同。

方法

get
傳回資料檢視 (設定檔) 的即時資料。