[null,null,["上次更新時間:2025-07-24 (世界標準時間)。"],[],[],null,["Step 2: Integrate Google Analytics\n\n\u003cbr /\u003e\n\n|--------------------------------------------------------------------------------------------------------------------------|\n| Introduction: [Measure iOS Ads conversions](/docs/tutorials/ads-ios-on-device-measurement-event-data/index-event-driven) |\n| Step 1: [Link Your Ads Account with Google Analytics](/docs/tutorials/ads-ios-on-device-measurement-event-data/step-1) |\n| **Step 2: Integrate Google Analytics** \u003cbr /\u003e |\n| Step 3: [Troubleshoot and handle common issues](/docs/tutorials/ads-ios-on-device-measurement-event-data/step-3) |\n\n\u003cbr /\u003e\n\nNow that you've linked your Ads account, you can begin integrating the\nGoogle Analytics for Firebase SDK.\n\nIntegrate the Google Analytics for Firebase SDK\n\nIntegrate with the latest Google Analytics for Firebase SDK version.\n| **Note:** `GoogleAdsOnDeviceConversion` is not subject to [Apple's privacy manifest\n| requirements](//developer.apple.com/news/?id=3d8a9yyh) and does not include a privacy manifest. No additional action is required to enable on-device conversion measurement.\n\nUse Cocoapods\n\nIf your app uses Cocoapods, verify your project's Podfile contains the\n`GoogleAppAdsOnDeviceConversion` pod, through either the main\n`FirebaseAnalytics` pod or by including it explicitly as a standalone pod: \n\n pod 'FirebaseAnalytics' # includes GoogleAdsOnDeviceConversion\n\nor \n\n pod 'FirebaseAnalytics/Core'\n pod 'GoogleAdsOnDeviceConversion'\n\nThen, run the commands `pod repo update` and `pod install`.\n\nUse Swift Package Manager\n\nIf your app uses Swift Package Manager, follow the steps at\n[Swift Package Manager for Firebase](/docs/ios/installation-methods#swift-package-manager).\nWhen you reach the step \"Choose the Firebase libraries that you want include in\nyour app\", check `FirebaseAnalytics` before continuing to the next steps.\nAlternatively, check `FirebaseAnalytics/Core` *and*\n`GoogleAdsOnDeviceConversion`.\n\nAlternative integration\n\nIf your app does not use Cocoapods or Swift Package Manager, integrate as\nfollows:\n\n1. Download the public zip file of Firebase from the [firebase-ios-sdk GitHub repo](https://github.com/firebase/firebase-ios-sdk/releases).\n2. Follow the README instructions from the public zip file to add the frameworks to the project directly. Be sure to add the frameworks from the `FirebaseAnalytics`directory.\n3. In Xcode, add the `-ObjC` and `-lc++` flags to **Other Linker Settings** in your app target's build settings.\n\nEnable debug mode (optional)\n\nEnable debug mode by adding `-FIRDebugEnabled` under\n**Arguments Passed on Launch** in Xcode's scheme editor.\n\nUpon launching the app in Xcode, verify that a message like the following\nappears in the Xcode debug console: \n\n [Firebase/Analytics][I-ACS023007] Analytics v.X.X.X started\n ...\n [Firebase/Analytics][I-ACS023009] Debug logging enabled\n ...\n [FirebaseAnalytics][I-ACS023278] Conversion service GoogleAdsOnDeviceConversion framework is linked\n\nWait around 15 seconds and verify that the `_psmvalue_gads` message appears in\nthe Xcode debug console: \n\n [FirebaseAnalytics][I-ACS023087] User property set. Name, value: _psmvalue_gads, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n\n| **Note:** This message won't appear for users/devices located in the European Economic Area (EEA), the United Kingdom, and Switzerland.\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[arrow_back_ios**Step 1** Link Your Ads Account with Google Analytics](/docs/tutorials/ads-ios-on-device-measurement-event-data/step-1)\n[**Step 3** : Troubleshoot and handle common issuesarrow_forward_ios](/docs/tutorials/ads-ios-on-device-measurement-event-data/step-3)\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]