評估行動應用程式中的重要事件
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
透過重要事件評估,您可以瞭解使用者互動是否有效促成行動,例如在行動應用程式內購買、訂閱和註冊。
您可以透過 Google Ads 和 Google Analytics 4 評估行動裝置應用程式轉換和重要事件。
Google Ads
如要在 Google Ads 帳戶中擷取轉換,請從 Google Analytics 4 資源匯入事件:
- 登入 Google Ads 帳戶。
- 按一下帳戶右上角的
。
- 在「評估」部分下方,按一下「轉換」。
- 按一下「
」。
- 從轉換類型清單中選取「應用程式」。
- 按一下「Google Analytics 4 (Firebase)」,然後點選「繼續」。
- 在您要匯入的每個事件旁勾選方塊,然後按一下「匯入」。
- 按一下 [完成]。
進一步瞭解 Google Ads 轉換。
Google Analytics 4
Google Analytics 4 資源可讓您跨網站和行動應用程式,統一評估使用者互動和事件。Google Analytics 4 預設會收集許多事件,並自動將部分事件標示為重要事件。Google Analytics 4 資源中的應用程式資料串流會使用 Firebase SDK 傳送事件。進一步瞭解事件。
此外,您也可以啟用或停用其他自動收集的事件,或是將自訂事件標示為重要事件。
您可以在事件傳送前或後,將事件登錄為重要事件。
如要在事件傳送前註冊事件,請按照下列步驟操作:
- 在 Analytics 中,前往 Google Analytics 4 資源的報表。
- 按一下「重要事件」。
- 按一下「新增重要事件」。
- 輸入要標示為重要事件的事件名稱。注意:請確認您輸入的事件名稱與要傳送的事件完全相同。
- 按一下 [儲存]。
如果您先前已傳送事件,並想將其標示為重要事件,請按照下列步驟操作:
- 在 Analytics 中,前往 Google Analytics 4 資源的報表。
- 按一下 [所有事件]。
- 在事件對應的資料列中,將「標示為重要事件」欄中的切換鈕撥到開啟狀態。
如要傳送自訂事件,請按照下列步驟操作:
Android:Java
Bundle params = new Bundle();
params.putString("image_name", name);
params.putString("full_text", text);
mFirebaseAnalytics.logEvent("share_image", params);
Android:Kotlin
firebaseAnalytics.logEvent("share_image") {
param("image_name", name)
param("full_text", text)
}
iOS:Swift
Analytics.logEvent("share_image", parameters: [
"name": name as NSObject,
"full_text": text as NSObject
])
iOS:Objective-C
[FIRAnalytics logEventWithName: @ "share_image"
parameters: @ {
@ "name": name,
@ "full_text": text
}
];
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-30 (世界標準時間)。
[null,null,["上次更新時間:2024-11-30 (世界標準時間)。"],[[["\u003cp\u003eKey event measurement allows you to track user interactions within your mobile app that lead to valuable customer actions like purchases and sign-ups.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Ads and Google Analytics 4 can be used to measure mobile app conversions and key events for analysis and optimization.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Analytics 4 provides unified measurement across your website and mobile app, collecting many events by default with the option to customize key events for specific tracking needs.\u003c/p\u003e\n"],["\u003cp\u003eYou can mark events as key events in Google Analytics 4 either before they are sent or retroactively after they have been recorded.\u003c/p\u003e\n"]]],["Key mobile app user activities, like purchases and sign-ups, can be measured as conversions in Google Ads and key events in Google Analytics 4. In Google Ads, import events from Google Analytics 4 by navigating to **Conversions** and selecting **App**. In Google Analytics 4, register events as key events by entering the event's exact name under **Key events** or marking the event under **All events**. Custom events can be sent via the Firebase SDK, as demonstrated with code examples for Android and iOS.\n"],null,["# Measure key events in mobile apps\n\nKey event measurement can help you to understand if user interactions\neffectively lead to valuable customer activity within your mobile app, such as\nin-app purchases, subscriptions, and sign-ups.\n\nMobile app conversions and key events may be measured in [Google Ads](#google_ads) and\n[Google Analytics 4](#google_analytics_4).\n\nGoogle Ads\n----------\n\nTo capture conversions in your Ads account, import events from your Google\nAnalytics 4 property:\n\n1. Sign in to your [Google Ads account](https://ads.google.com/).\n2. Click in the upper-right corner of your account.\n3. Under the section labeled **Measurement** click **Conversions**.\n4. Click .\n5. Select **App** from the list of conversion types.\n6. Click **Google Analytics 4 (Firebase)** , then click **Continue**.\n7. Check the box next to each event you'd like to import, click **Import**.\n8. Click **Done**.\n\n[Learn more about Google Ads conversions](https://support.google.com/google-ads/answer/6366292).\n\nGoogle Analytics 4\n------------------\n\nGoogle Analytics 4 properties enable unified measurement of user interactions\nand events across your website and mobile app. Google Analytics 4 collects many\nevents by default, and some events are automatically marked as key events. App\ndata streams within Google Analytics 4 properties utilize the [Firebase SDK](https://firebase.google.com/docs/guides) to\nsend events. [Learn more about events](https://developers.google.com/tag-platform/devguides/events).\n\nAdditionally, you can [enable or turn off](https://support.google.com/analytics/answer/9267568) other automatically collected events,\nor mark custom events as key events as well.\n\nYou can register an event as a key event either before or after the event is\nsent.\n\nTo register an event before it is sent:\n\n1. In Analytics, navigate to the reports for your Google Analytics 4 property.\n2. Click **Key events**.\n3. Click **New key event**.\n4. Enter the name of the event you want to identify as a key event. *Note:\n Make sure the event name you enter is exactly the same as the event that you\n are sending.*\n5. Click **Save**.\n\nIf you've already sent the event previously and want to mark it as a key event:\n\n1. In Analytics, navigate to the reports for your Google Analytics 4 property.\n2. Click **All events**.\n3. In the row for the event, turn on the switch in the **Mark as key event** column.\n\nTo send a custom event, do the following: \n\n### Android: Java\n\n Bundle params = new Bundle();\n params.putString(\"image_name\", name);\n params.putString(\"full_text\", text);\n mFirebaseAnalytics.logEvent(\"share_image\", params);\n\n### Android: Kotlin\n\n firebaseAnalytics.logEvent(\"share_image\") {\n param(\"image_name\", name)\n param(\"full_text\", text)\n }\n\n### iOS: Swift\n\n Analytics.logEvent(\"share_image\", parameters: [\n \"name\": name as NSObject,\n \"full_text\": text as NSObject\n ])\n\n### iOS: Objective-C\n\n [FIRAnalytics logEventWithName: @ \"share_image\"\n parameters: @ {\n @ \"name\": name,\n @ \"full_text\": text\n }\n ];"]]