ادغام Zucks با AdMob Mediation

پلتفرم مورد نظر را انتخاب کنید: اندروید (بتا)جدید اندروید، iOS، یونیتی ، فلاتر

This guide is intended for publishers who are interested in using Google Mobile Ads mediation with Zucks . It walks through the setup of a mediation adapter to work with your current iOS app and the configuration of additional settings.

منابع زاکس
مستندات
SDK
آداپتور
پشتیبانی مشتری
پیش‌نیازها پرایمرهای مفید

مقالات مرکز راهنمایی زیر اطلاعات پیش‌زمینه‌ای در مورد میانجیگری ارائه می‌دهند:

Zucks را به پروژه خود اضافه کنید

Integrate ads into your app the same as before. To integrate non-interstitial ads (banner size, leaderboard size, and so on), see Banner Ads . To integrate interstitial ads (full-screen ads that mask all other content), see Interstitial Ads .

مراحل زیر، جایگاه تبلیغ شما را به یک جایگاه واسطه‌ای تبدیل می‌کند که می‌تواند تبلیغات را از چندین شبکه نشان دهد.

  1. آداپتور و SDK مخصوص Zucks را از منابع بالا دانلود کنید.

  2. آداپتور/SDK شبکه دانلود شده را در Xcode اضافه کنید: روی پروژه خود کلیک راست کرده و روی Add Files to project کلیک کنید.

  3. هرگونه چارچوب، پرچم کامپایلر یا پرچم لینکر مورد نیاز Zucks را وارد کنید. نیازی به نوشتن کد اضافی نیست. Mediation در صورت لزوم، آداپتور Zucks و SDK را برای ایجاد تبلیغات فراخوانی می‌کند.

تنظیم اعلان رویداد

To be notified of ad lifecycle events like impressions, you can implement a GADBannerViewDelegate . When using mediation, this delegate is automatically notified of events from Zucks. For example, impressions from any ad network are reported through the adViewDidReceiveAd: method of GADBannerViewDelegate .

مقدار adNetworkClassName را بررسی کنید

You can optionally check the adNetworkClassName property on GADBannerView , which returns the ad network class name of the ad network that fetched the current banner once the adViewDidReceiveAd callback is called:

سویفت
func adViewDidReceiveAd(_ bannerView: GADBannerView) {
  print("Banner adapter class name: \(bannerView.adNetworkClassName)")
}
هدف-سی
- (void)adViewDidReceiveAd:(GADBannerView *)bannerView {
  NSLog(@"Banner adapter class name: %@", bannerView.adNetworkClassName);
}

به طور مشابه، برای بینابینی‌ها، ویژگی adNetworkClassName را در GADInterstitialAd درون interstitialDidReceiveAd بررسی کنید:

سویفت
func interstitialDidReceiveAd(_ ad: GADInterstitialAd) {
  print("Interstitial adapter class name: \(ad.adNetworkClassName)")
}
هدف-سی
- (void)interstitialDidReceiveAd:(GADInterstitialAd *)interstitial {
  NSLog(@"Interstitial adapter class name: %@", interstitial.adNetworkClassName);
}
برای تبلیغاتی که از AdMob برگردانده می‌شوند، adNetworkClassName GADMAdapterGoogleAdMobAds را برمی‌گرداند. برای تبلیغاتی که از طریق رویدادهای سفارشی دریافت می‌شوند، مقدار GADMAdapterCustomEvents را برمی‌گرداند.