מערכת Google Analytics אוספת ומנתחת מידע על המשתמשים, וכך
עוזרות לכם לטרגט קבוצות ספציפיות של משתמשים באמצעות חוויות ברמה גבוהה יותר של התאמה אישית באפליקציה —
במקרה הזה, חוויית הצפייה במודעות באפליקציה.
מוסיפים את Google Analytics for Firebase SDK לאפליקציה
כדי להשתמש ב-Google Analytics עם AdMob ו-Firebase, צריך להוסיף את Google Analytics for Firebase SDK לקוד של האפליקציה.
ה-SDK הזה יתעד באופן אוטומטי אירועים ומאפייני משתמשים מסוימים. אין צורך להוסיף קוד כדי להפעיל אותם. מערכת Google Analytics תשתמש בנתונים האלה כדי
לפלח את המשתמשים לקהלים.
לתשומת ליבך, האפליקציה כבר צריכה לקבל את ה-SDK של Google Mobile Ads (AdMob) מ-
מהשלב הקודם במדריך הזה.
Swift
מוסיפים ומתקינים את ה-pod של Google Analytics for Firebase ב-podfile:
pod'Firebase/Analytics'
Android
הוספת התלות של ספריית Google Analytics for Firebase אל
קובץ build.gradle:
מהרמה הבסיסית (root) של פרויקט Flutter, מריצים את הפקודה הבאה כדי להתקין את הפקודה
הפלאגין Google Analytics for Firebase:
flutter pub add firebase_analytics
Unity
מורידים ומתקינים את הגרסה העדכנית ביותר
Firebase Unity SDK, ואז מוסיפים
חבילת Google Analytics for Firebase לפרויקט שלכם: FirebaseAnalytics.unitypackage
הסבר על הקהלים ב-Google Analytics
בעזרת Google Analytics אפשר לפלח את המשתמשים לקהלים, שהם
קבוצות של משתמשים שיש להם מאפיינים זהים. כל המשתמשים בקהל נתון
הפגינו התנהגות זהה באפליקציה (לדוגמה, הוסיפו פריט ל
עגלת הקניות) ו/או לשתף נתונים דמוגרפיים או נתונים תיאוריים אחרים (כמו גיל
טווח).
מערכת Google Analytics מספקת באופן אוטומטי קהל ברירת מחדל בשם 'קונים', שהוא נפוץ ברוב האפליקציות. כל משתמש שביצע רכישה מתוך האפליקציה או רכישה במסחר אלקטרוני יתווסף לקהל הזה.
כשמשתמשים באסטרטגיית מונטיזציה היברידית, לא רוצים להציג מודעות באפליקציה
מודעות למשתמשים שביצעו רכישה. אז אפשר להשתמש ב-Google Analytics
קהל של "רוכשים" כשמגדירים את Firebase Remote Config.
למידע נוסף על קהלים, ריכזנו כאן כמה מקורות מידע ב-Google Analytics:
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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*** ** * ** ***"]]