[英]Google Analytics: Difference between Core Reporting API, Unsampled Report API and GA reporting API
[英]How to store unsampled reports from Google Analytics API to Google Drive?
我閱讀了有關如何將未采樣報告的數據從Google Analytics API檢索到Google雲端硬盤的說明: https : //developers.google.com/analytics/devguides/config/mgmt/v3/unsampled-reports#introduction
據我了解,以下是檢索未采樣報告的步驟:1。將未采樣的報告存儲到Google Drive API 2.使用Drive API下載文件
但是,我找不到有關如何將非抽樣報告存儲到Google雲端硬盤API的說明。 你能詳細告訴我如何做到這一點嗎? 如果可以,請告訴我如何使用Drive API下載文件。
先感謝您。
首先,非抽樣報告僅適用於Google Analytics 360(以前稱為Google Analytics Premium)用戶。 因此,如果您僅使用產品的免費版本,則此功能根本不可用,API應該會給您一個錯誤。
Unsampled API有3種方法:
現在您必須記住,非抽樣報告可能需要幾個小時才能生成。 因此,使用Unsampled Reporting API的動態顯然與Core Reporting API略有不同。 在對Core Reporting API進行查詢后,您可以立即獲得結果。 使用Unsampled API,您只需創建一個報告,並且必須等待它准備好。
粗略地說,這是從Unsampled API導出數據的工作方式。
insert
方法創建新的Unsampled Report。 響應可能具有以下status: PENDING
表示正在處理報告。 您想要存儲從此請求獲得的id
參數。 id
並向API發出get
請求。 這將為您提供未采樣報告的當前狀態。 如果仍然是PENDING則返回步驟(2)。 driveDownloadDetails.documentId
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.