In Google Analytics werden Informationen zu Ihren Nutzern erfasst und analysiert. So können Sie bestimmte Nutzergruppen mit personalisierten App-Funktionen ansprechen – in diesem Fall die In-App-Anzeigen.
Das Google Analytics for Firebase SDK in Ihre App einfügen
Wenn Sie Google Analytics mit AdMob und Firebase verwenden möchten, müssen Sie den
Google Analytics for Firebase SDK in die Codebasis Ihrer App einbinden.
Mit diesem SDK werden bestimmte Ereignisse und Nutzerdimensionen automatisch protokolliert. Sie müssen keinen Code hinzufügen, um sie zu aktivieren. In Google Analytics werden diese Daten für folgende Zwecke genutzt:
Nutzer in Zielgruppen zu segmentieren.
Deine App sollte bereits das Google Mobile Ads (AdMob) SDK von
zum vorherigen Schritt
dieser Anleitung.
Swift
Fügen Sie den Google Analytics for Firebase-Pod in Ihre Podfile-Datei ein und installieren Sie ihn:
pod'Firebase/Analytics'
Android
Fügen Sie die Abhängigkeit der Google Analytics for Firebase-Bibliothek zu Ihrem
build.gradle-Datei:
Führen Sie im Stammverzeichnis Ihres Flutter-Projekts den folgenden Befehl aus, um das Google Analytics for Firebase-Plug-in zu installieren:
flutter pub add firebase_analytics
Einheit
Aktuelle Version herunterladen und installieren
Firebase Unity SDK und fügen Sie dann
das Google Analytics for Firebase-Paket zu Ihrem Projekt hinzu: FirebaseAnalytics.unitypackage
Google Analytics-Zielgruppen
Mit Google Analytics können Sie Ihre Nutzer in Zielgruppen unterteilen.
Gruppen von Nutzern mit denselben Attributen. Alle Nutzer in einer bestimmten Zielgruppe haben in Ihrer App dasselbe Verhalten gezeigt (z. B. einen Artikel in den Einkaufswagen gelegt) und/oder sie haben demografische oder andere beschreibende Daten gemeinsam (z. B. die Altersgruppe).
In Google Analytics wird automatisch die Spalte „Käufer“ die Standardzielgruppe,
bei den meisten Apps üblich. Alle Nutzer, die einen In-App- oder E-Commerce-Kauf getätigt haben, werden in diese Zielgruppe aufgenommen.
Wenn Sie eine hybride Monetarisierungsstrategie verwenden, sollten Sie Nutzern, die etwas gekauft haben, keine In-App-Anzeigen präsentieren. Damit Sie diese Google Analytics-Daten
Zielgruppe von „Käufer“ wenn Sie Firebase Remote Config einrichten.
Hier finden Sie einige Google Analytics-Ressourcen mit weiteren Informationen zu Zielgruppen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[],[],null,["Step 2: Set up Google Analytics\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------|\n| Introduction: [Optimize hybrid monetization using AdMob, Google Analytics, and Firebase](/docs/tutorials/optimize-hybrid-monetization) |\n| Step 1: Use AdMob to create new ad units for display |\n| **Step 2: [Set up Google Analytics](/docs/tutorials/optimize-hybrid-monetization/step-2)** \u003cbr /\u003e |\n| Step 3: [Set up Firebase Remote Config to show specific ads experiences](/docs/tutorials/optimize-hybrid-monetization/step-3) |\n\n\u003cbr /\u003e\n\nGoogle Analytics collects and analyzes information about your users, which can\nhelp you target specific groups of users with more customized app experiences ---\nin this case, their in-app ads experience.\n\n**Add the Google Analytics for Firebase SDK to your app**\n\nTo use Google Analytics with AdMob and Firebase, you need to add the\nGoogle Analytics for Firebase SDK to your app's codebase.\n\nThis SDK will automatically log certain events and user dimensions; you don't\nneed to add any code to enable them. Google Analytics will use this data to\nsegment your users into audiences.\n\nNote that your app should already have the Google Mobile Ads (AdMob) SDK from\nthe previous step of this tutorial. \n\nSwift\n\nAdd and install the Google Analytics for Firebase pod in your podfile: \n\n pod 'Firebase/Analytics'\n\nAndroid\n\nAdd the Google Analytics for Firebase library dependency to your\n`build.gradle` file: \n\n implementation 'com.google.firebase:firebase-analytics:23.0.0'\n\nFlutter\n\nFrom the root of your Flutter project, run the following command to install\nthe Google Analytics for Firebase plugin: \n\n flutter pub add firebase_analytics\n\nUnity\n\nDownload and install the latest\n[Firebase Unity SDK](https://firebase.google.com/download/unity), and then add\nthe Google Analytics for Firebase package to your project: \n\n`FirebaseAnalytics.unitypackage`\n\n**Understand Google Analytics audiences**\n\nUsing Google Analytics, you can segment your users into **audiences**, which are\ngroups of users who share the same attributes. All the users in a given audience\nhave exhibited the same behavior in your app (for example, added an item to\ncart) and/or share demographic or other descriptive data (for example, age\nrange).\n\nGoogle Analytics automatically provides a \"Purchasers\" default audience that's\ncommon for most apps. Any user who has made an in-app purchase or an ecommerce\npurchase will be placed in this audience.\n\nWhen using a hybrid monetization strategy, you do **not** want to show in-app\nads to users who have made a purchase. So you can leverage this Google Analytics\naudience of \"Purchasers\" when you set up Firebase Remote Config.\n\nHere are some Google Analytics resources to learn more about audiences:\n\n- [Introduction to audiences in Google Analytics](https://support.google.com/analytics/answer/12799087)\n\n- [Examples of audiences in Google Analytics and how to create them](https://support.google.com/analytics/answer/12799863)\n\nIn the next step of this tutorial, you'll leverage the \"Purchasers\" audience in\nsetting up Firebase Remote Config.\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\n[arrow_back_ios**Step 1** : Use AdMob to create new ad units for display](/docs/tutorials/optimize-hybrid-monetization)\n[**Step 3** : Set up Remote Config to show specific ads experiences\narrow_forward_ios](/docs/tutorials/optimize-hybrid-monetization/step-3)\n\n\u003cbr /\u003e\n\n*** ** * ** ***"]]