Follow this guide to quickly add Vungle iOS SDK to the AdMob mediation layer. Including Vungle ads in AdMob mediation requires integrating the Vungle adapter, which enables communication between the AdMob SDK and the Vungle SDK.
- AdMob must be set up before starting this tutorial. To begin, sign up for an AdMob account.
- The Vungle AdMob iOS adapter supports both interstitial and rewarded video placements.
- Interstitial video ads play automatically at your selected placement. Vungle calls these non-incentivized ads.
- Rewarded video ads are user opt-in and offer rewards to users in exchange for ad views. Vungle calls these incentivized ads.
- If you haven't already done so, head over to the Vungle dashboard and add your app to your account. This step is required for you to get your Vungle Application ID. You will use the Vungle App ID to initialize Vungle within AdMob.
- Log into the AdMob dashboard and click + Monetize New App.
- In Step 1 - Select an app, click Search For Your App if your app is live on the Apple App Store. If you are adding your app manually, make sure you select iOS as Platform.
- In Step 2 - Select ad format and ad unit:
- For Interstitial ads, make sure the Video option is selected, because all Vungle ads are of this nature.
- For Rewarded Interstitial ads, select the Set a reward option and enter values in the Reward amount and Reward item fields. Vungle does not support the Use third-party ad network settings functionality.
- Click + New Ad Network and select Vungle from the left panel. Find your Vungle Application ID on the Vungle dashboard (Vungle uses one app ID for both interstitial and rewarded interstitial).
- For Ad network optimization (Optional), enter the Reporting API key to give AdMob access to your eCPM through the Vungle Reporting API. (Refer to How can I request a Reporting API key? for the key, if you don't have it.)
- Follow AdMob’s Get Started guide to integrate AdMob SDK into your iOS project.
- Continue with AdMob’s Interstitial Ads guide and/or Rewarded Ads: Publishers Get Started guide to request and display ads.
- Download the Vungle AdMob Adapter 1.3.1
- Download the Vungle iOS SDK 4.1.0
- Add the Vungle AdMob adapter to your project by placing it under the Frameworks folder.
- In Get Started with Vungle - iOS SDK, follow Step 1 ("1. Add the Vungle framework to your Xcode project"). You can simply add the Vungle framework by using Cocoapods or by integrating it manually.
Vungle will now be in the default AdMob waterfall, along with any other ad networks you choose. Now all you need to do is test the integration, submit the app, and go live by switching Vungle and AdMob out of Test Mode!
AdMob adapter v1.3.0 with iOS SDK v4.0.6 supports extra parameters.
Sets unique user ID to be passed to Vungle SDK to be used in server-to-server callback for incentivized ads.
Sets the starting sound state for the ad. If set to YES, video begins with muted sound, but the user may modify.
Sample integration code:
VungleAdNetworkExtras *extras = [[VungleAdNetworkExtras alloc] init]; extras.userId = @"userId"; extras.muted = YES; GADRequest *request = [GADRequest request]; [request registerAdNetworkExtras:extras];
// reward-based [[GADRewardBasedVideoAd sharedInstance] loadRequest:request withAdUnitID:UnitIDRewardBased];
// interstitial GADInterstitial *interstitial = [[GADInterstitial alloc] initWithAdUnitID:UnitIDInterstitial];