Aby omawiać nasze usługi i przekazywać opinie na ich temat, dołącz do oficjalnego kanału Discord usługi Ad Manager na serwerze społeczności Google Ads i pomiarów.
W przypadku określania stawek: wtyczka Unity do reklam mobilnych Google w wersji 4.2.0 lub nowszej.
Inicjowanie pakietu SDK do reklam mobilnych Google
Przewodnik Szybki start pokazuje, jak zainicjować pakiet SDK do reklam mobilnych Google.
Podczas tego wywołania inicjującego inicjowane są też adaptery mediacji. Aby zweryfikować pełne uczestnictwo każdej sieci reklamowej w pierwszym żądaniu reklamy, przed wczytaniem reklam poczekaj na zakończenie inicjowania.
Poniższy przykładowy kod pokazuje, jak przed wysłaniem żądania reklamy sprawdzić stan inicjowania każdego adaptera.
MobileAds.Initialize((InitializationStatusinitializationStatus)=>
{Dictionary<string,AdapterStatus>map=initializationStatus.getAdapterStatusMap();foreach(KeyValuePair<string,AdapterStatus>keyValuePairinmap){stringclassName=keyValuePair.Key;AdapterStatusstatus=keyValuePair.Value;switch(status.InitializationState){caseAdapterState.NotReady:// The adapter initialization did not complete.Debug.Log($"Adapter: {className} is not ready.");break;caseAdapterState.Ready:// The adapter was successfully initialized.Debug.Log($"Adapter: {className} is initialized.");break;}}});
Pamiętaj, aby wyłączyć odświeżanie w interfejsach wszystkich zewnętrznych źródeł reklam w przypadku jednostek reklamowych banerów używanych w zapośredniczeniu. Zapobiega to podwójnemu odświeżaniu, ponieważ Ad Manager również wywołuje odświeżanie na podstawie częstotliwości odświeżania jednostki banera reklamowego.
Korzystanie z reklam natywnych w ramach zapośredniczenia
Oto kilka sprawdzonych metod, które warto wziąć pod uwagę podczas wdrażania mediacji natywnej.
Zasady dotyczące prezentowania reklam natywnych
Każda sieć reklamowa ma własne zasady. Pamiętaj, że podczas korzystania z zapośredniczenia aplikacja nadal musi przestrzegać zasad sieci zapośredniczonej, która dostarczyła reklamę.
Amerykańskie przepisy stanowe o ochronie prywatności i RODO
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-09-06 UTC."],[[["\u003cp\u003eThis guide explains how to integrate a mediation adapter with your Unity app, enabling you to serve ads from multiple ad networks.\u003c/p\u003e\n"],["\u003cp\u003eBefore integrating mediation, ensure you've integrated the desired ad formats (banner, interstitial, native, rewarded, rewarded interstitial) into your app.\u003c/p\u003e\n"],["\u003cp\u003eInitialize the Mobile Ads SDK, which also initializes mediation adapters, and wait for completion before loading ads to ensure all ad networks can participate.\u003c/p\u003e\n"],["\u003cp\u003eWhen using banner ads with mediation, disable refresh in third-party ad source UIs to avoid double refreshing.\u003c/p\u003e\n"],["\u003cp\u003eFor native ads, adhere to each ad network's presentation policies and comply with US privacy laws and GDPR by adding mediation partners in Ad Manager's Privacy & Messaging settings.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\nThis guide shows you how to integrate a mediation adapter with your\nUnity app.\n\nPrerequisites\n\nBefore you can integrate mediation for an ad format, you need to integrate that\nad format into your app:\n\n- [Banner Ads](/ad-manager/mobile-ads-sdk/unity/banner)\n- [Interstitial Ads](/ad-manager/mobile-ads-sdk/unity/interstitial)\n- [Native Ads](/ad-manager/mobile-ads-sdk/unity/native)\n- [Rewarded Ads](/ad-manager/mobile-ads-sdk/unity/rewarded)\n- [Rewarded Interstitial\n Ads](/ad-manager/mobile-ads-sdk/unity/rewarded-interstitial)\n\nNew to mediation? Read\n\n[Introduction to mediation](//support.google.com/admanager/answer/6272813).\n\nFor bidding:\n\nGoogle Mobile Ads Unity plugin 4.2.0\nor higher.\n\nInitialize Google Mobile Ads SDK\n\nThe quick start guide shows you how to [initialize the Google Mobile Ads SDK](/ad-manager/mobile-ads-sdk/unity/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 MobileAds.Initialize((InitializationStatus initializationStatus) =\u003e\n {\n Dictionary\u003cstring, AdapterStatus\u003e map = initializationStatus.getAdapterStatusMap();\n foreach (KeyValuePair\u003cstring, AdapterStatus\u003e keyValuePair in map)\n {\n string className = keyValuePair.Key;\n AdapterStatus status = keyValuePair.Value;\n switch (status.InitializationState)\n {\n case AdapterState.NotReady:\n // The adapter initialization did not complete.\n Debug.Log($\"Adapter: {className} is not ready.\");\n break;\n case AdapterState.Ready:\n // The adapter was successfully initialized.\n Debug.Log($\"Adapter: {className} is initialized.\");\n break;\n }\n }\n }); \n https://github.com/googleads/googleads-mobile-unity/blob/9544f919c5c8067939fa38d7fb45d698a7408dc1/samples/HelloWorld/Assets/Snippets/MediationSnippets.cs#L13-L32\n\n\u003cbr /\u003e\n\nUse banner ads with mediation\n\nMake sure to disable refresh in all third-party ad source UIs for banner ad\nunits used in mediation. This prevents a\ndouble refresh since Ad Manager also triggers a refresh\nbased on your banner ad unit's refresh rate.\n\nUse native ads with mediation\n\nThe following are some best practices to consider when implementing native\nmediation.\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/admanager/answer/9561023) or [General Data Protection\nRegulation (GDPR)](//support.google.com/admanager/answer/7666366), follow the\nsteps in [US state regulations\nsettings](//support.google.com/admanager/answer/10115735) or [GDPR\nsettings](//support.google.com/admanager/answer/10113006#adding_ad_partners_to_published_gdpr_messages) to add your\nmediation partners in Ad Manager 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)](/ad-manager/mobile-ads-sdk/unity/privacy/us-states) and obtaining GDPR consent with the\n[Google User Messaging Platform (UMP) SDK](/ad-manager/mobile-ads-sdk/unity/privacy)."]]