AdMob 미디에이션은 AdMob 네트워크, 서드 파티 광고 소스 등 다양한 소스를 통해 앱에 광고를 한곳에서 게재할 수 있는 기능입니다. AdMob 미디에이션을 이용하면 여러 네트워크에 광고 요청을 전송하여 광고 게재에 최적인 네트워크를 찾을 수 있으므로 유효노출률을 극대화하고 수익을 늘리는 데 도움이 됩니다.
우수사례
기본 요건
광고 형식에 적합한 미디에이션 기능을 통합하기 전에 해당 광고 형식을 앱에 통합해야 합니다.
빠른 시작 가이드에서는 Google 모바일 광고 SDK를 초기화하는 방법을 보여줍니다.
초기화 호출 중에는 미디에이션 어댑터도 초기화됩니다. 첫 번째 광고 요청에 모든 광고 네트워크가 참여할 수 있도록 하려면 광고를 로드하기 전에 초기화가 완료될 때까지 기다려야 합니다.
다음 샘플 코드에서는 광고 요청을 하기 전에 각 어댑터의 초기화 상태를 확인하는 방법을 보여줍니다.
voidmain(){WidgetsFlutterBinding.ensureInitialized();MobileAds.instance.initialize().then((initializationStatus){initializationStatus.adapterStatuses.forEach((key,value){debugPrint('Adapter status for $key: ${value.description}');});});runApp(MyApp());}
Gradle 설정 업데이트 (Android만 해당)
플러그인의 Android API를 사용할 수 있도록 settings.gradle 파일에 다음 줄을 추가합니다.
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 프로젝트에 추가해야 합니다. Android의 앱 수준 build.gradle 파일과 iOS의 Podfile를 업데이트하여 추가할 수 있습니다. Google에는 Android와 iOS 모두를 위한 GitHub의 오픈소스 어댑터가 있습니다.
앱에 어댑터를 추가하는 방법에 관한 자세한 안내는 각 파트너 네트워크의 Android 및 iOS 문서를 참고하세요.
[[["이해하기 쉬움","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(UTC)"],[[["\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)."]]