Ads hesabınızı bağladığınıza göre Google Analytics for Firebase SDK'sını entegre etmeye başlayabilirsiniz.
Firebase için Google Analytics SDK'sını entegre etme
Firebase için en son Google Analytics SDK sürümüyle entegrasyon yapın.
Cocoapods'u kullanma
Uygulamanız Cocoapods kullanıyorsa projenizin Podfile dosyasında GoogleAppAdsOnDeviceConversion kapsülü olduğunu doğrulayın. Bunu, ana FirebaseAnalytics kapsülü aracılığıyla veya bağımsız bir kapsül olarak açıkça ekleyerek yapabilirsiniz:
pod'FirebaseAnalytics'# includes GoogleAdsOnDeviceConversion
Ardından pod repo update ve pod install komutlarını çalıştırın.
Swift Package Manager'ı kullanma
Uygulamanız Swift Package Manager kullanıyorsa Firebase için Swift Package Manager bölümündeki adımları uygulayın.
"Uygulamanıza dahil etmek istediğiniz Firebase kitaplıklarını seçin" adımına ulaştığınızda sonraki adımlara geçmeden önce FirebaseAnalytics işaretini onaylayın.
Alternatif olarak FirebaseAnalytics/CoreveGoogleAdsOnDeviceConversion seçeneklerini işaretleyebilirsiniz.
Alternatif entegrasyon
Uygulamanız Cocoapods veya Swift Package Manager kullanmıyorsa aşağıdaki şekilde entegre edin:
Çerçeveleri doğrudan projeye eklemek için herkese açık zip dosyasında bulunan README talimatlarını uygulayın. Çerçeveleri FirebaseAnalytics dizininden eklediğinizden emin olun.
Xcode'da, uygulama hedefinizin derleme ayarlarındaki Diğer Bağlantı Yöneticisi Ayarları'na -ObjC ve -lc++ işaretlerini ekleyin.
Hata ayıklama modunu etkinleştirme (isteğe bağlı)
Xcode'un şema düzenleyicisinde Başlatmada İletilen Bağımsız Değişkenler bölümüne -FIRDebugEnabled ekleyerek hata ayıklama modunu etkinleştirin.
Uygulamayı Xcode'da başlattıktan sonra Xcode hata ayıklama konsolunda aşağıdaki gibi bir mesajın göründüğünü doğrulayın:
[Firebase/Analytics][I-ACS023007] Analytics v.X.X.X started
...
[Firebase/Analytics][I-ACS023009] Debug logging enabled
...
[FirebaseAnalytics][I-ACS023278] Conversion service GoogleAdsOnDeviceConversion framework is linked
Yaklaşık 15 saniye bekleyin ve Xcode hata ayıklama konsolunda _psmvalue_gads mesajının göründüğünü doğrulayın:
[FirebaseAnalytics][I-ACS023087] User property set. Name, value: _psmvalue_gads, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-09-06 UTC."],[],[],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*** ** * ** ***"]]