數據分析服務
Analytics 服務可讓您在 Apps Script 中使用 Google Analytics Management API 和 Reporting API。這些 API 可讓 Analytics 使用者取得帳戶結構相關資訊,並執行成效報表。
參考資料
如要進一步瞭解這項服務,請參閱各種 Google Analytics API 的參考說明文件:
與 Apps Script 中的所有進階服務一樣,Analytics 服務會使用與公用 API 相同的物件、方法和參數。詳情請參閱「如何決定方法簽章」。
如要回報問題或尋求其他支援,請參閱對應的支援頁面:
程式碼範例
以下是 Management API 第 3 版的程式碼範例。
列出帳戶結構
範例會列出目前使用者可存取的所有 Google Analytics 帳戶、網站資源和設定檔。
執行報表
這個範例會執行報表,擷取前 25 個關鍵字和流量來源,並將結果儲存在新試算表中。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["The Analytics service enables the use of Google Analytics Management and Reporting APIs within Apps Script to access account structure and performance data."],["This advanced service requires prior enabling before utilization and mirrors the functionality of the public Google Analytics APIs."],["Provided sample code demonstrates listing account structures (accounts, web properties, and profiles) and running reports to extract keyword and traffic source data."],["Comprehensive reference documentation and support pages for various Google Analytics APIs are linked for further information and troubleshooting."]]],[]]