This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Yahoo using mediation, covering waterfall integrations. It covers how to add Yahoo to an ad unit's mediation configuration, and how to integrate the Yahoo Mobile SDK and adapter into an iOS app.
Supported integrations and ad formats
The AdMob mediation adapter for Yahoo has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | |
Interstitial | |
Rewarded | |
Native |
Requirements
- iOS deployment target of 12.0 or higher
Latest Google Mobile Ads SDK
Complete the mediation Get started guide
Step 1: Set up configurations in Yahoo UI
Log in to Yahoo's SSP. Under Applications and Sites, click the + button then Application.
Fill out the form and click Save and Add Placement to create your app.
Once you've created an app, you will need to create a Placement. Select a Placement Type, fill out the form, and click Save & Monetize.
Take note of your Placement ID.
You will need to add an Ad Source to your placement. On the next form, select Yahoo SSP as an Ad Source and fill out the form with the required information. Once you've completed the form, click Save.
Finally, drag the Ad Source that you just created under the Waterfall Ad Sources table to add it to your placement.
Take note of the Site ID.
Turn on test mode
Yahoo ads can be tested by creating a Test Ad Source and adding it into your placement's Waterfall Ad Sources. Navigate to your Placement ID's settings, click the Add button and select Test Ad Source.
Once you've created the Ad Source, drag it into your placement's Waterfall Ad Sources.
That's it! You now have a working mediation integration with Yahoo.
Step 2: Set up Yahoo demand in AdMob UI
Configure mediation settings for your ad unit
You need to add Yahoo to the mediation configuration for your ad unit.
First, sign in to your AdMob account. Next, navigate to the Mediation tab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it, and skip ahead to Add Yahoo as an ad source.
To create a new mediation group, select Create Mediation Group.
Enter your ad format and platform, then click Continue.
Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled, and then click Add Ad Units.
Associate this mediation group with one or more of your existing AdMob ad units. Then click Done.
You should now see the ad units card populated with the ad units you selected:
Add Yahoo as an ad source
Under the Waterfall card in the Ad Sources section, select Add Ad Source. Then select Yahoo .
Select Yahoo . Then enter an eCPM value for Yahoo and click Continue.If you already have a mapping for Yahoo , you can select it. Otherwise, click Add mapping.
Next, enter the Placement ID and Site ID obtained in the previous section. Then click Done.
Add Yahoo to GDPR and US state regulations ad partners list
Follow the steps in GDPR settings and US state regulations settings to add Yahoo to the GDPR and US state regulations ad partners list in the AdMob UI.
Step 3: Import the Yahoo Mobile SDK and adapter
Using CocoaPods (recommended)
Add the following line to your project's Podfile:
pod 'GoogleMobileAdsMediationYahoo'
From the command line run:
pod install --repo-update
Step 4: Implement privacy settings on Yahoo SDK
US states privacy laws
U.S. states privacy laws require giving users the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The U.S. states privacy laws compliance guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance.
The following sample code shows how to pass consent information to the Yahoo Mobile SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads through the Google Mobile Ads SDK.
Swift
import YASAds
import YASCcpaConsent
// ...
let ccpaConsent = YASCcpaConsent(consentString: "<CCPA CONSENT>")
YASAds.sharedInstance.add(ccpaConsent)
Objective-C
#import <YASAds.h>
#import <YASCcpaConsent.h>
// ...
YASCcpaConsent *ccpaConsent = [[YASCcpaConsent alloc] initWithConsentString: @"<CCPA CONSENT>"];
[YASAds.sharedInstance addConsent: ccpaConsent];
See Publisher Privacy Settings for more details and the values that can be provided in the method.
Step 5: Add required code
No additional code required for Yahoo integration.
Step 6: Test your implementation
Enable test ads
Make sure you register your test device for AdMob and enable test mode in Yahoo UI.
Verify test ads
To verify that you are receiving test ads from Yahoo , enable single ad source testing in ad inspector using the Yahoo (Waterfall) ad source(s).
Optional steps
Using native ads
Ad rendering
The Yahoo adapter returns its native ads as
GADNativeAd
objects. It populates the following
Native ads field descriptions
for a
GADNativeAd
.
Field | Populated by Yahoo adapter |
---|---|
Headline | |
Image | |
Body | |
App icon | |
Call to action | |
Advertiser Name | |
Star rating | |
Store | |
Price |
Yahoo iOS Mediation Adapter Changelog
Next Version
- Now requires Google Mobile Ads SDK version 10.4.0 or higher.
- Replaced the deprecated childDirectedTreatment method with GADMobileAds.sharedInstance.requestConfiguration.tagForChildDirectedTreatment.
Version 1.4.0.0
- Rebranded Verizon Media adapter to "Yahoo" adapter.
- Verified compatibility with Yahoo Mobile SDK version 1.4.0.
- Updated the adapter to use the
didRewardUser
API. - Removed support of the
armv7
architecture. - Removed use of deprecated gender, birthday and location mediation APIs.
- Now requires a minimum deployment target of iOS 11.0.
- Now requires Google Mobile Ads SDK version 10.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 10.3.0.
- Yahoo Mobile SDK version 1.4.0