Thank you for joining Vungle’s App Bidding Beta Program. Vungle is partnering with MoPub as a bidder in MoPub Advanced Bidding.
Before You Begin
To participate in Vungle App Bidding, you must integrate:
- MoPub SDK
- Vungle SDK v6.7.1 or higher (v6.8.0+ is preferable for more optimized performance)
Step 1. Set Up Vungle Bidding in the MoPub Publisher UI
Always refer to MoPub Advanced Bidding for publisher integration and guidelines.
- Make sure you have already added Vungle as a network in MoPub mediation.
- In the MoPub Publisher UI, locate your app and the ad unit(s) for which you want to enable app bidding.
- Under Manage bidders, set Vungle to enabled for Advanced Bidding, as shown below.
- Enter the Vungle Placement Reference ID and App ID.
Recommended: Use Both Advanced Bidding and Waterfall Setups
In MoPub, you can use Advanced Bidding and Waterfall at the same time for different placements. If a significant portion of your users has not yet upgraded to the latest app (containing the Advanced Bidding SDK), we recommend leaving your waterfall placements as they are to continue ad monetization with those users.
Step 2. Set Up App Bidding in the Vungle Dashboard
These instructions assume that you already have a Vungle app and placements created.
- Log into the Vungle Publisher Dashboard and create new placements for app bidding. Do not use existing placements for app bidding. Set up one placement per supported ad format; for example, set one placement for interstitial and one for rewarded video. Note: The Vungle banner and MREC ad formats will be supported for Advanced Bidding in the first half of 2021.
- Tell your Account Manager which placement(s) you want to use for app bidding.
Step 3. Integrate MoPub Mediation with the Vungle SDK
iOS
Follow the instructions in the Integrate the MoPub SDK for iOS article to integrate Vungle with MoPub mediation.
Early SDK Initialization (Required)
Initialization has varying effects depending on the Advanced Bidder. To guarantee success with every bidder, MoPub requires that you initialize the network SDKs before initializing the MoPub SDK.
Sample code:
- (void)initVungleSDK { [[VungleSDK sharedSDK] performSelector:@selector(setPluginName:version:) withObject:@"mopub" withObject:[[[VungleAdapterConfiguration alloc] init] adapterVersion]]; NSError * error = nil; // disable banner refresh(must) [[VungleSDK sharedSDK] disableBannerRefresh]; // Optional. To set the user's consent status to opted in. To set opted out, please use VungleConsentDenied [[VungleSDK sharedSDK] updateConsentStatus:VungleConsentAccepted consentMessageVersion:@"Some Consent Message Version"]; [[VungleSDK sharedSDK] startWithAppId:"YOUR_VUNGLE_APP_ID" error:&error]; [[VungleSDK sharedSDK] setDelegate:self]; } #pragma mark - VungleSDKDelegate Methods - (void) vungleSDKDidInitialize { MPLogInfo(@"Vungle: the SDK has been initialized successfully."); // Initialize config object with existing app ad unit ID MPMoPubConfiguration *sdkConfig = [[MPMoPubConfiguration alloc] initWithAdUnitIdForAppInitialization:@"AD_UNIT_ID"]; sdkConfig.loggingLevel = MPBLogLevelDebug; sdkConfig.allowLegitimateInterest = YES; // According to MoPub.h docs, we should be initializing here [[MoPub sharedInstance] initializeSdkWithConfiguration:sdkConfig completion:^{ NSLog(@"MoPub instance has been properly initialized"); }]; }
Android
Follow the instructions in the Integrate the MoPub SDK for Android article to integrate Vungle with MoPub mediation.
Early SDK Initialization (Required)
Initialization has varying effects depending on the Advanced Bidder. To guarantee success with every bidder, MoPub requires that you initialize the network SDKs before initializing the MoPub SDK.
Sample code:
final Map<String, String> configuration = new HashMap<>();
configuration.put("VNG_MIN_SPACE_INIT",50);
configuration.put("VNG_MIN_SPACE_LOAD_AD",50);
configuration.put("VNG_DEVICE_ID_OPT_OUT", false);
VungleRouter vungleRouter = VungleRouter.getInstance();
//Optional: GDPR configure Vungle.Consent.OPTED_IN or Vungle.Consent.OPTED_OUT
vungleRouter.updateConsentStatus(Vungle.Consent.OPTED_IN);
//Required: Vungle SDK default settings with MoPub HBP
//configuration can be null
VungleSettings vungleSettings = vungleRouter.applyVungleNetworkSettings(configuration);
Vungle.init("YOUR_VUNGLE_APP_ID", getApplicationContext(), new InitCallback() {
@Override
public void onSuccess() {
// Initialization has succeeded and SDK is ready to load an ad or play one if there
// is one pre-cached already
SdkConfiguration sdkConfiguration = new SdkConfiguration.Builder("YOUR_MOPUB_ADUNIT_ID")
.withMediatedNetworkConfiguration(VungleAdapterConfiguration.class.getName(), configuration).build();
MoPub.initializeSdk(this, sdkConfiguration, initSdkListener());
}
@Override
public void onError(VungleException e) {
}
@Override
public void onAutoCacheAdAvailable(String placementId) {
// Callback to notify when an ad becomes available for the cache optimized placement
// NOTE: This callback works only for the cache optimized placement. Otherwise, please use
// LoadAdCallback with loadAd API for loading placements.
}
}, vungleSettings);
Unity
Follow the instructions in the Integrate the MoPub SDK for Unity article to integrate Vungle with MoPub mediation.
Early SDK Initialization (Required)
Initialization has varying effects depending on the Advanced Bidder. To guarantee success with every bidder, MoPub requires that you initialize the network SDKs before initializing the MoPub SDK.
- Option 1. Initialize Using the MoPub Manager (Recommended). Refer to the section about network configuration settings.
- Option 2. Initialize MoPub Manually
Sample code:
MoPub.InitializeSdk(new MoPub.SdkConfiguration { LogLevel = MoPub.LogLevel.Debug, AdUnitId = adUnitId, MediatedNetworks = new MoPub.MediatedNetwork[] { new MoPub.SupportedNetwork.Vungle { #if UNITY_ANDROID AdapterConfigurationClassName = "com.mopub.mobileads.VungleAdapterConfiguration", #elif UNITY_IOS AdapterConfigurationClassName = "VungleAdapterConfiguration", #endif NetworkConfiguration = new Dictionary<string, string>{ {"appId", YOUR_VUNGLE_APP_ID} }, }, }, });