تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
توسّط AdMob هو عبارة عن ميزة تتيح لك عرض الإعلانات على تطبيقاتك من مصادر متعددة، بما في ذلك شبكة AdMob ومصادر الإعلانات التابعة لجهات خارجية، وذلك في مكان واحد. تساعد ميزة "توسّط AdMob" في زيادة معدّل التعبئة إلى أقصى حد وزيادة معدّل تحقيق الربح المادي من خلال إرسال طلبات الإعلان إلى شبكات متعددة لضمان عثورك على أفضل شبكة متاحة لعرض إعلاناتك.
دراسة حالة
المتطلبات الأساسية
قبل دمج التوسّط مع أحد أشكال الإعلانات، عليك دمج شكل الإعلان هذا في تطبيقك باتّباع الخطوات التالية:
إعداد حزمة "SDK لإعلانات Google على الأجهزة الجوّالة"
يوضّح لك دليل البدء السريع كيفية إعداد حزمة "SDK لإعلانات Google على الأجهزة الجوّالة".
أثناء مكالمة الإعداد هذه، يتم أيضًا إعداد وسيطاء التوسّط. من المهم الانتظار إلى أن تكتمل عملية التهيئة قبل تحميل الإعلانات، وذلك للتأكّد من مشاركة جميع شبكات الإعلانات بشكل كامل في طلب الإعلان الأول.
يوضّح نموذج الرمز البرمجي التالي كيفية التحقّق من حالة تهيئة كل وسيط قبل تقديم طلب إعلان.
voidmain(){WidgetsFlutterBinding.ensureInitialized();MobileAds.instance.initialize().then((initializationStatus){initializationStatus.adapterStatuses.forEach((key,value){debugPrint('Adapter status for $key: ${value.description}');});});runApp(MyApp());}
تعديل إعدادات Gradle (على أجهزة Android فقط)
أضِف الأسطر التالية إلى ملف settings.gradle، حتى تتمكّن من استخدام واجهات برمجة التطبيقات لنظام Android الخاصة بالمكوّن الإضافي:
defflutterSdkPath={defproperties=newProperties()file("local.properties").withInputStream{properties.load(it)}defflutterSdkPath=properties.getProperty("flutter.sdk")assertflutterSdkPath!=null,"flutter.sdk not set in local.properties"returnflutterSdkPath}()includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
إضافة تبعيات لشبكات الشركاء
يجب إضافة وسيطات التوسّط وتبعياتها إلى مشاريع Android وiOS. يمكن إضافة هذه الأذونات من خلال تعديل ملف build.gradle
على مستوى التطبيق على Android وPodfile على iOS. توفّر Google محوّلات مفتوحة المصدر في GitHub لكل من نظامَي التشغيل Android وiOS.
راجِع مستندات
Android
وiOS
كل شبكة شركاء للحصول على إرشادات تفصيلية حول كيفية إضافة
محوّل الشبكة في تطبيقك.
التحقّق من فئة محوّل شبكة الإعلانات التي حمّلت الإعلان
يوضّح نموذج الرمز التالي كيفية تسجيل اسم فئة شبكة الإعلانات الخاصة بإعلان بانر:
احرص على إيقاف ميزة إعادة التحميل في جميع واجهات المستخدم الخاصة بمصادر الإعلانات التابعة لجهات خارجية لوحدات إعلانات البانر المستخدَمة في "التوسّط" في AdMob. يمنع ذلك إعادة التحميل المزدوج لأنّ AdMob يفعّل أيضًا عملية إعادة تحميل استنادًا إلى معدّل إعادة التحميل الخاص بوحدة إعلانات البانر.
استخدام "الإعلانات المدمجة مع المحتوى" من خلال "توسّط AdMob"
في ما يلي بعض أفضل الممارسات التي يجب أخذها في الاعتبار عند تنفيذ الإعلانات المدمجة مع المحتوى في "توسّط AdMob".
سياسة عرض الإعلانات المدمجة مع المحتوى
لكل شبكة إعلانات سياساتها الخاصة. عند استخدام التوسّط، من المهم تذكُّر أنّه يجب أن يظل تطبيقك ملتزمًا بسياسات شبكة التوسّط التي قدّمت الإعلان.
قوانين الخصوصية في الولايات الأمريكية و"اللائحة العامة لحماية البيانات"
تاريخ التعديل الأخير: 2025-09-06 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-06 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eAdMob Mediation lets you maximize ad revenue by serving ads from multiple ad networks, including AdMob and third-party sources, all in one platform.\u003c/p\u003e\n"],["\u003cp\u003eBefore integrating mediation, ensure you've integrated the desired ad format (banner, interstitial, native, rewarded, or rewarded interstitial) and initialized the Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to add dependencies for your chosen partner networks in your Android and iOS projects and update your Gradle settings for Android.\u003c/p\u003e\n"],["\u003cp\u003eAdMob Mediation requires specific configurations for banner and native ads to ensure optimal performance and compliance with ad network policies.\u003c/p\u003e\n"],["\u003cp\u003eTo comply with privacy regulations like GDPR and U.S. state privacy laws, remember to add your mediation partners to the AdMob Privacy & messaging settings.\u003c/p\u003e\n"]]],["AdMob Mediation serves ads from multiple sources, maximizing fill rates. Key actions include: verifying account permissions, integrating ad formats (banner, interstitial, native, rewarded), and initializing the Mobile Ads SDK while checking adapter statuses. Update Android's `settings.gradle` and add dependencies for partner networks via `build.gradle` (Android) or `Podfile` (iOS). Disable refresh on third-party UIs for banner ads. Adhere to ad network policies and ensure partners are listed for US states' privacy laws and GDPR compliance.\n"],null,["AdMob Mediation is a feature lets you serve ads to your apps from\nmultiple sources, including the AdMob Network and third-party ad sources, in\none place. AdMob Mediation helps maximize your fill rate and increase your\nmonetization by sending ad requests to multiple networks to verify you find the\nbest available network to serve ads.\n[Case study](//admob.google.com/home/resources/cookapps-grows-ad-revenue-86-times-with-admob-rewarded-ads-and-mediation/).\n\n\nPrerequisites **Important:** Verify that you have the necessary account permissions to complete the mediation configuration. These permissions include access to inventory management, app access, and privacy and messaging features. See [Manage user access to your\n| account](//support.google.com/admob/answer/2784628) for details.\n\nBefore you can integrate mediation for an ad format, you need to integrate that\nad format into your app:\n\n- [Banner Ads](/admob/flutter/banner)\n- [Interstitial Ads](/admob/flutter/interstitial)\n- [Native Ads](/admob/flutter/native)\n- [Rewarded Ads](/admob/flutter/rewarded)\n- [Rewarded Interstitial\n Ads](/admob/flutter/rewarded-interstitial)\n\nNew to mediation? Read\n\n[Overview of AdMob Mediation](//support.google.com/admob/answer/3063564).\n\nInitialize Google Mobile Ads SDK\n\nThe quick start guide shows you how to [initialize the Google Mobile Ads SDK](/admob/flutter/quick-start#initialize_the_mobile_ads_sdk).\nDuring that initialization call, mediation adapters also\nget initialized. It is important to wait for initialization to complete before\nyou load ads in order to verify full participation from every ad network on the\nfirst ad request.\n| **Important:** Bidding adapters require you to explicitly initialize Google Mobile Ads SDK.\n\nThe following sample code shows how you can check each adapter's initialization\nstatus prior to making an ad request. \n\n void main() {\n WidgetsFlutterBinding.ensureInitialized();\n MobileAds.instance.initialize()\n .then((initializationStatus) {\n initializationStatus.adapterStatuses.forEach((key, value) {\n debugPrint('Adapter status for $key: ${value.description}');\n });\n });\n runApp(MyApp());\n }\n\nUpdate your gradle settings (Android only)\n\nAdd the following lines to your `settings.gradle` file, so you can use the\nplugin's Android APIs: \n\n def flutterSdkPath = {\n def properties = new Properties()\n file(\"local.properties\").withInputStream { properties.load(it) }\n def flutterSdkPath = properties.getProperty(\"flutter.sdk\")\n assert flutterSdkPath != null, \"flutter.sdk not set in local.properties\"\n return flutterSdkPath\n }()\n\n includeBuild(\"$flutterSdkPath/packages/flutter_tools/gradle\")\n\nAdd dependencies for partner networks\n\nThe mediation adapters and their dependencies need to be added to your Android\nand iOS projects. They can be added by updating your app level `build.gradle`\nfile on Android and `Podfile` on iOS. Google has open source adapters in GitHub\nfor both\n[Android](//github.com/googleads/googleads-mobile-android-mediation/tree/master/ThirdPartyAdapters)\nand\n[iOS](//github.com/googleads/googleads-mobile-ios-mediation/tree/main/adapters).\n\nSee the\n[Android](/admob/android/choose-networks#network_details)\nand\n[iOS](/admob/ios/choose-networks#network_details)\ndocumentation for each partner network for detailed guidance of how to add their\nadapter in your app.\n\nCheck which ad network adapter class loaded the ad\n\nThe following sample code demonstrates how to log the ad network class name for\na banner ad: \n\n final bannerAd = BannerAd(\n size: AdSize.banner,\n adUnitId: '\u003cyour-ad-unit\u003e',\n listener: BannerAdListener(\n onAdLoaded: (ad) {\n debugPrint('$ad loaded: ${ad.responseInfo?.mediationAdapterClassName}');\n },\n ),\n request: AdRequest(),\n );\n\nUse banner ads with AdMob Mediation\n\nMake sure to disable refresh in all third-party ad source UIs for banner ad\nunits used in AdMob Mediation. This prevents a double refresh since\nAdMob also triggers a refresh based on your banner ad unit's\nrefresh rate.\n\nUse native ads with AdMob Mediation\n\nThe following are some best practices to consider when implementing native ads\nin AdMob Mediation.\n\nNative ad presentation policy\n: Each ad network has its own policies. When using mediation, it's important to\n remember that your app still needs to abide by the policies of the mediated\n network that provided the ad.\n\nUS states privacy laws and GDPR\n\nIf you need to comply with the [U.S. states privacy\nlaws](//support.google.com/admob/answer/9561022) or [General Data Protection\nRegulation (GDPR)](//support.google.com/admob/answer/7666366), follow the\nsteps in [US state regulations\nsettings](//support.google.com/admob/answer/10860309) or [GDPR\nsettings](//support.google.com/admob/answer/10113004#adding_ad_partners_to_published_gdpr_messages) to add your\nmediation partners in AdMob Privacy \\& messaging's\nUS states or GDPR ad partners list. Failure to do so can lead to partners\nfailing to serve ads on your app.\n\nLearn more about enabling [restricted data processing\n(RDP)](/admob/flutter/privacy/us-states) and obtaining GDPR consent with the\n[Google User Messaging Platform (UMP) SDK](/admob/flutter/privacy)."]]