您可以使用事件,評估使用者在網站或應用程式中的特定互動或情況,例如何時載入網頁、點按連結或完成購物,或是評估應用程式異常終止或廣告曝光等系統行為。
事件類型
系統會自動收集以下類型的事件:
- 自動收集的事件是指您在網站或應用程式中設定 Google Analytics 後,系統預設會收集的事件。
- 加強型評估事件是指您在網站或應用程式中設定 Google Analytics 並啟用加強型評估功能後,系統會收集的事件。
下列類型的事件必須在導入完成後,才會在 Analytics 中顯示:
- 建議事件是指您自行導入的事件,當中包含預先定義的名稱和參數。導入這類事件後,您就能使用現有和日後推出的報表功能。
- 自訂事件是指您定義的事件。請務必僅在沒有任何其他事件符合您的用途時,才建立自訂事件。大部分的標準報表不會顯示自訂事件,因此您需要設定自訂報表或探索,才能取得有意義的分析資訊。
運作方式
假設使用者在已加入代碼的網站上,點按連往外部網站的連結。使用者點按連結後的情形如下:
1 |
2 |
3 |
4 |
使用者造訪您的網站並點按外部網站連結 | Analytics 接收點擊事件,並在即時報表中顯示事件和相關參數 | Analytics 全面處理此事件 | Analytics 透過在報表、目標對象等工具中使用的維度和指標,來顯示資料 |
即時查看事件
從網站或應用程式傳送事件後,您就能透過下列報表確認 Analytics 是否已成功收集事件:
即時報表
DebugView 報表
瞭解重要事件
A key event is an event that measures an action that's particularly important to the success of your business. When someone triggers the event by performing the action, the key event is recorded in Google Analytics and surfaced in your Google Analytics reports.
Any event you collect can become a key event. To measure a key event, create or identify an event that measures the action and then mark the event as a key event. After you mark the event as a key event, you can see how many users perform the action and evaluate marketing performance across all channels that lead users to perform the action.
The following flow shows how to mark an event as a key event. In short, if an event is important to your business's success, you can mark the event as a key event in Analytics.
Event → Key Event
瞭解事件分組
使用者在網站或應用程式上觸發的事件大多不會逐一個別傳送。大多數事件反而會歸入同一組做處理 (或進行批次處理)。
不過,某些情況不會進行批次處理:
- 重要事件雖然可能屬於批次中的某部分,但會立即傳送
- 在偵錯模式中載入的容器永遠不會批次處理事件,以利提供即時體驗
- 使用者離開網頁時,系統會傳送裝置保留的事件
- 在不支援
sendBeacon
API 的瀏覽器環境中,所有事件都會立即傳送
注意:使用者的裝置離線時 (例如使用者在瀏覽應用程式時網際網路連線中斷),Analytics 會將事件資料儲存在裝置中,然後在裝置恢復連線後傳送資料。Analytics 會略過觸發後超過 72 小時才送達的事件。