與 Google Analytics 整合
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Analytics 平台可讓您評估使用者在各種裝置和環境中與貴公司互動的情形。這個平台提供收集、儲存、處理及回報這類使用者互動資料所需的一切運算資源。
在用戶端和伺服器端都能進行分析資料收集作業。Google Analytics 提供簡單好用的 API 和 SDK,方便您傳送資料至 Google Analytics。此外,我們還開發了可在 App Engine 應用程式中使用的程式碼,讓您輕鬆傳送伺服器端分析資料至 Google Analytics。
收集用戶端分析資料
您可以使用資料收集 API 和 SDK,評估使用者與您的內容和行銷活動互動的情形。實作這些 API 和 SDK 後,您就能透過 Google Analytics 或 Reporting API 查看使用者互動資料。如要進一步瞭解用戶端的分析數據收集,請依照用戶端類型選取下列相關連結:
收集 App Engine 伺服器端分析資料
雖然 App Engine 提供在應用程式中記錄事件的機制,但在 Google Analytics 中追蹤特定伺服器端事件或許對您更有利。以下列舉一些好處:
- 歷史資料分析:App Engine 可讓您設定記錄檔的天數上限或大小。超過天數上限後,您就無法再存取記錄檔。但如果您使用 Google Analytics 追蹤事件,過去事件的效期會更長,您也能夠查看更久以前的記錄。
- 追蹤重要事件:由於應用程式的各種元件會將資料寫入記錄檔,因此這些檔案可能相當繁雜。事件追蹤功能可以讓您只鎖定想監控的重要事件,然後追蹤這些事件和一些其他中繼資料。
- 強大的使用者介面:Google Analytics 提供豐富的使用者介面,可用於透過視覺效果呈現、回報及匯出伺服器端事件。
只要在 App Engine 應用程式中整合下列原始碼範例,即可輕鬆享有以上好處。如要進一步瞭解這個做法,請參閱 Google Analytics 開發人員指南的「事件追蹤」部分。
原始碼範例
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-30 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-30 (世界標準時間)。"],[[["The Google Analytics Platform offers comprehensive resources for measuring user interactions across various devices and environments, covering data collection, storage, processing, and reporting."],["Analytics collection can be performed on both the client and server sides, with Google Analytics providing APIs and SDKs for easy data transmission, along with pre-developed code for App Engine server-side analytics."],["Client-side analytics allows the tracking of user interaction with content and marketing efforts through Web Tracking, Android, iOS, and Measurement Protocol."],["Server-side event tracking in Google Analytics provides benefits over standard App Engine logs, including historical data analysis, focused tracking of key events, and a user-friendly interface for data visualization and reporting."],["The sample code provided demonstrates how to integrate event tracking into App Engine applications, sending data directly to Google Analytics for analysis."]]],[]]