This guide is intended for publishers who are interested in using Google Mobile Ads mediation with Flurry . It walks through the setup of a mediation adapter to work with your current iOS app and the configuration of additional settings.
| منابع Flurry |
|---|
| مستندات |
| SDK |
| آداپتور |
| پشتیبانی مشتری |
پیشنیازها
An iOS app with Google Mobile Ads SDK integrated. (If you don't have one, see Get Started .)
A Google Ad Manager account with Mediation for mobile apps configured.
Flurry را به پروژه خود اضافه کنید
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 .
The following steps change your ad placement into a mediation placement that can show ads from multiple networks.
Download the adapter and SDK for Flurry from the resources above .
Add the downloaded network adapter/SDK in Xcode: right-click on your project and click Add Files to project .
Include any frameworks, compiler flags, or linker flags that Flurry require. There's no need to write additional code. Mediation invokes the Flurry adapter and SDK as necessary to create ads.
تنظیم اعلان رویداد
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 Flurry. For example, impressions from any ad network are reported through the adViewDidReceiveAd: method of GADBannerViewDelegate .
مقدار adNetworkClassName را بررسی کنید
You can optionally check the adNetworkClassName property on GAMBannerView , 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: GAMBannerView) {
print("Banner adapter class name: \(bannerView.adNetworkClassName)")
}
هدف-سی
- (void)adViewDidReceiveAd:(GAMBannerView *)bannerView {
NSLog(@"Banner adapter class name: %@", bannerView.adNetworkClassName);
}
Similarly, for interstitials, check the adNetworkClassName property on GAMInterstitialAd inside interstitialDidReceiveAd :
سویفت
func interstitialDidReceiveAd(_ ad: GAMInterstitialAd) {
print("Interstitial adapter class name: \(ad.adNetworkClassName)")
}
هدف-سی
- (void)interstitialDidReceiveAd:(GAMInterstitialAd *)interstitial {
NSLog(@"Interstitial adapter class name: %@", interstitial.adNetworkClassName);
}
GADMAdapterCustomEvents .