Integrating AdMob Mediation + Vungle SDK v.1.0-v.4.1 (iOS)

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.

Contents

1. Before you get started...

2. Add your app on the AdMob dashboard

3. Integrate the AdMob SDK into your iOS project

4. Integrate the Vungle Adapter and SDK into your iOS project

5. Vungle is now on AdMob Mediation

6. Advanced Feature (Optional): Passing Additional Parameters

1. Before you get started…

  • 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.

2. Add your app on the AdMob dashboard

  1. Log into the AdMob dashboard and click + Monetize New App.

  2. 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.

  3. 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.



  4. After adding your app, follow this guide to add Vungle as an ad network.



    • 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.)

3. Integrate the AdMob SDK into your iOS project

  1. Follow AdMob’s Get Started guide to integrate AdMob SDK into your iOS project.
  2. Continue with AdMob’s Interstitial Ads guide and/or Rewarded Ads: Publishers Get Started guide to request and display ads.

4. Integrate the Vungle Adapter and SDK into your iOS project

  1. Download the Vungle AdMob Adapter 1.3.1
  2. Download the Vungle iOS SDK 4.1.0
  3. Add the Vungle AdMob adapter to your project by placing it under the Frameworks folder.



  4. 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.

 

5. Vungle is now on AdMob Mediation

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!

6. Advanced Feature (Optional): Passing Additional Parameters

AdMob adapter v1.3.0 with iOS SDK v4.0.6 supports extra parameters.

Method 

Description

userId

Sets unique user ID to be passed to Vungle SDK to be used in server-to-server callback for incentivized ads.

muted

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];
[self.interstitial loadRequest:request];
 
Have more questions? Submit a request

Comments