教學課程:使用第一方資料評估 iOS 應用程式廣告活動的 Google Ads 轉換
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
解決方案教學課程
Google 的裝置端轉換評估功能可改善 iOS 應用程式廣告活動可觀察轉換量的準確度,同時保障使用者個人資料的隱私性。本教學課程將說明解決方案的運作方式,並引導您完成實作所需的步驟。
運作方式
裝置端轉換評估可用於評估 iOS 應用程式廣告活動帶來的應用程式安裝和應用程式內動作。Google Analytics for Firebase SDK 會根據您應用程式的登入服務所提供的使用者身分,在裝置端進行歸因。系統會透過裝置端轉換方法隱藏使用者的身分,因此任何個人識別資訊絕不會從使用者裝置外流。
如要使用這項技術,您必須取得使用者提供的電子郵件地址或電話號碼,並取得使用者的同意。透過 initiateOnDeviceConversionMeasurement()
API,Google Analytics 會使用電子郵件地址或電話號碼進行歸因,以便在裝置上傳送這類個人資料時,不會以可識別使用者或裝置的方式傳送。這項功能適用於搭載 iOS 12 以上版本的應用程式。
您可以使用 Firebase Authentication,讓使用者透過一或多種登入方式登入應用程式。整合 Firebase Authentication 後,您可以取得登入使用者的電子郵件或電話號碼,並傳送至 Google Analytics for Firebase SDK。
本教學課程使用的產品和功能
Google Ads
Google Ads 可讓您提高安裝次數、深入瞭解廣告轉換,並使用 Google Analytics 目標對象放送指定廣告活動,吸引使用者群。
Google Analytics
Google Analytics 可讓您深入瞭解使用者參與度、回訪率和營利指標,例如總收益、AdMob 收益、購買收益等等。您也可以使用這項功能建立使用者目標對象和區隔。
|
Firebase Authentication
Firebase Authentication 提供後端服務、簡單易用的 SDK 和現成 UI 程式庫,可驗證應用程式使用者。這項服務支援使用密碼、電話號碼、熱門聯合身分識別資訊提供者 (例如 Google、Facebook 和 Twitter) 等進行驗證。
|
教學課程總覽
直接前往逐步教學課程
實作登入體驗
使用 Firebase Authentication 建構登入體驗。
或者,您也可以將 Firebase Authentication 與自訂登入體驗結合。
在登入介面中取得使用者的電子郵件地址或電話號碼。
將 Google Analytics 整合至應用程式
請按照 Cocoapods、Swift Package Manager 或手動安裝的整合步驟操作。
您可以選擇在 Xcode 中啟用偵錯模式。
啟動裝置端轉換評估
使用收集到的電子郵件或電話號碼呼叫裝置端的 measurement API。
使用偵錯記錄驗證 API 函式。
排解常見問題
如有需要,請參閱 Firebase Authentication 和 Google Analytics 的支援資源,藉此排解問題。
處理一些常見問題。
事前準備
步驟 1:實作登入體驗arrow_forward_ios
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["**Solution tutorial**\n\nGoogle's on-device conversion measurement improves the number of observable\nconversions from your iOS app campaigns while keeping users' personal data\nprivate. In this tutorial, you'll learn how the solution works and follow along\nwith the steps needed to implement it.\n\nHow does this work?\n\nOn-device conversion measurement helps measure app installs and in-app actions\nfrom your iOS app campaigns. The Google Analytics for Firebase SDK\nperforms on-device attribution using a user's identity provided by your app's\nsign-in experience. The user's identity is hidden through our on-device\nconversion approach so that no personally identifiable information ever leaves\nthe user's device.\n\nTo use this technology, you need a consented, user-provided email address or\nphone number. Through the `initiateOnDeviceConversionMeasurement()` API, the\nemail address or phone number is used by the Google Analytics for\nFirebase SDK for attribution such that this personal data is never sent off the\ndevice in a way that can identify the user or device. The feature works on apps\nrunning iOS 12+.\n\nYou can use Firebase Authentication to allow users to sign in to your app using\none or more sign-in methods. Once integrated with Firebase Authentication, you can get\nthe signed-in user's email or phone number to send to the Google Analytics\nfor Firebase SDK.\n\nProducts and features used in this tutorial\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Google Ads \u003e [Google Ads](/docs/ads) lets you drive installs, gain deep insights into ad conversions, and run targeted ad campaigns using Google Analytics audiences to engage your user base. Google Analytics \u003e [Google Analytics](/docs/analytics) gives you insight into user engagement, retention, and monetization metrics like total revenue, AdMob revenue, purchase revenue, and much more. It also allows you to create user audiences and segments. | Firebase Authentication \u003e [Firebase Authentication](/docs/auth) provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers (like Google, Facebook, and Twitter), and more. |\n\n\u003cbr /\u003e\n\nTutorial overview\n\n[Go\ndirectly to the step-by-step tutorial](/docs/tutorials/ads-ios-on-device-measurement/step-1)\n\n1. [**Implement\n a sign-in experience**](/docs/tutorials/ads-ios-on-device-measurement/step-1)\n\n 1. Use Firebase Authentication to build a sign-in experience.\n\n 2. Or, combine Firebase Authentication with your custom sign-in experience.\n\n 3. In your sign-in interface, get the user's email address or phone number.\n\n2. [**Integrate\n Google Analytics into your app**](/docs/tutorials/ads-ios-on-device-measurement/step-2)\n\n 1. Follow integration steps for Cocoapods, Swift Package Manager or manual\n installation.\n\n 2. Optionally, enable debug mode in Xcode.\n\n3. [**Initiate\n on-device conversion measurement**](/docs/tutorials/ads-ios-on-device-measurement/step-3)\n\n 1. Call the on-device measurement API with the email or phone number you\n gathered.\n\n 2. Verify API function with debug logs.\n\n4. [**Troubleshoot and\n handle common issues**](/docs/tutorials/ads-ios-on-device-measurement/step-4)\n\n 1. If needed, troubleshoot with the help of support resources for\n Firebase Authentication and Google Analytics.\n\n 2. Handle some commonly-encountered issues.\n\nWhat you'll need\n\n- Your own app that can run on iOS 12 or higher\n\n- Your app registered as a Firebase App that's linked to Google Analytics\n and Ads\n\n- Your preferred IDE\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[**Step 1** : Implement a sign-in experiencearrow_forward_ios](/docs/tutorials/ads-ios-on-device-measurement/step-1)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]