Integrating Fyber Marketplace with Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from Fyber Marketplace via mediation. It covers how to add Fyber Marketplace to an ad unit's mediation configuration and how to integrate the Fyber Marketplace SDK and adapter into an Android app.

Supported ad formats and features

The Ad Manager mediation adapter for Fyber Marketplace has the following capabilities:

Formats
Banners
Interstitials
Rewarded Video
Native Ads
Features
Smart banners
Automatic Data Collection
Native Video

Requirements

  • Android API level 16 or higher
  • Latest Google Mobile Ads SDK

Step 1: Set up Fyber Marketplace

Sign up or log in to Fyber Marketplace's Revenue Desk.

Navigate to the Inventory tab, select Manage Apps / Sites and click on the Add App or Site button.

Manage Apps

Select Android as the Platform, fill out the rest of the form, and click Continue.

When prompted to create an Ad Spot and Ad Unit ID, enter your desired Ad Spot Name, the Format of the ad you wish to create, your desired Ad Unit Name, and fill out the rest of the form. Click Save and Continue.

Ad Spot

Next, allocate 100% of the traffic of your Ad Unit to your Ad Spot and click Continue.

Set Traffic

You will be presented with an overview of your application, as well as your created Ad Spots. Take note of the App ID, Spot ID and Ad Unit ID.

On Username > User Profile. Take note of the Publisher ID, Consumer Key and Consumer Secret as this will be needed in the next step.

Set Traffic

Step 2: Configure mediation settings for your Ad Manager ad unit

Sign in to your Ad Manager account. Navigate to Delivery > Yield groups and click the New yield group button.

Enter a unique Name for your yield group, set the Status to Active, select your Ad Format, and set the Inventory type to Mobile App. Under the Targeting > Inventory section, select the Ad Unit ID to which you want to add mediation.

Next, click the Add yield partner button.

If you already have a Yield partner for the Fyber Marketplace, you can simply select it. Otherwise, select Create a new yield partner.

Select Fyber Marketplace as the Ad network and enter a unique Name. Enable Mediation and turn on Automatic data collection. Enter the Publisher ID, Consumer Secret and Consumer Key obtained in the previous section. Click Save when done.

Once the Yield partner is selected, choose Mobile SDK Mediation as the Integration type, Android as the Platform, and Active as the Status. Enter the Application ID, Ad Spot ID and Ad Unit ID obtained in the previous section and a Default CPM value.

Click Save at the bottom of the page when done.

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Apply to all networks in Mediation groups box.

Rewarded

If you don't apply this setting, the Fyber Marketplace adapter passes back the reward specified in the Fyber Marketplace dashboard when creating the placement.

For more information on setting reward values for AdMob ad units, see Create an ad unit.

Step 3: Import the Fyber Marketplace SDK and adapter

Add the following implementation dependency with the latest version of the Fyber SDK and adapter in the app-level build.gradle file:

repositories {
    jcenter()

    maven {
      url "https://fyber.bintray.com/marketplace"
    }
}

...
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.google.android.gms:play-services-ads:19.5.0'
    implementation 'com.google.ads.mediation:fyber:7.7.1.0'
}
...

Manual integration

  • Download the latest version of the Fyber Marketplace SDK for Android and add the following files to your project:
    • ia-mraid-kit-release-x.y.z.aar
    • ia-sdk-core-release-x.y.z.aar
    • ia-video-kit-release-x.y.z.aar
  • Download the latest .aar file of the adapter from Bintray, located under the Files tab, and add it to your project.

Optional Steps

Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.

The section below shows you how to enable or disable personalized ads for Fyber Marketplace.

Fyber Marketplace contains an API to allow publishers to forward user consent to their SDK. The following sample code shows how to pass consent information to the Fyber Marketplace SDK manually. Should you choose to pass consent information to the Fyber Marketplace SDK manually, it is recommended that this code is called prior to requesting ads via the Google Mobile Ads SDK.

import com.fyber.inneractive.sdk.external.InneractiveAdManager;
// ...

InneractiveAdManager.setGdprConsent(true);
InneractiveAdManager.setGdprConsentString("myGdprConsentString");

Visit Fyber Marketplace's GDPR implementation guide and GDPR and You article for more information.

Network-specific parameters

The Fyber Marketplace adapter supports additional supports an additional parameter to pass the user's age:

Here's a code example of how to set this parameter:

Java

Bundle extras = new Bundle();
extras.putInt(InneractiveMediationDefs.KEY_AGE, 10);

AdRequest request = new AdRequest.Builder()
       .addNetworkExtrasBundle(FyberMediationAdapter.class, extras)
       .build();

Kotlin

var extras = Bundle()
extras.putInt(InneractiveMediationDefs.KEY_AGE, 10)

var adrequest = AdRequest.Builder()
       .addNetworkExtrasBundle(FyberMediationAdapter::class.java, extras)
       .build()

Fyber Android Mediation Adapter Changelog

Version 7.7.1.0

  • Verified compatibility with Fyber SDK 7.7.1.
  • Updated the minimum required Google Mobile Ads SDK version to 19.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.4.0.
  • Fyber SDK version 7.7.1.

Version 7.7.0.0

  • Verified compatibility with Fyber SDK 7.7.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.7.0.

Version 7.6.1.0

  • Verified compatibility with Fyber SDK 7.6.1.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.6.1.

Version 7.6.0.0

  • Verified compatibility with Fyber SDK 7.6.0.
  • Updated the adapter to support inline adaptive banner requests.
  • Updated the minimum required Google Mobile Ads SDK version to 19.3.0.
  • Fixed a bug where onAdOpened()/onAdClosed() methods were not being called for banner ads.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.6.0.

Version 7.5.4.0

  • Verified compatibility with Fyber SDK 7.5.4.
  • Updated the minimum required Google Mobile Ads SDK version to 19.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.1.0.
  • Fyber SDK version 7.5.4.

Version 7.5.3.0

  • Verified compatibility with Fyber SDK 7.5.3.

Built and tested with:

  • Google Mobile Ads SDK version 19.0.1.
  • Fyber SDK version 7.5.3.

Version 7.5.2.0

  • Verified compatibility with Fyber SDK 7.5.2.
  • Updated the minimum required Google Mobile Ads SDK version to 19.0.1.

Built and tested with:

  • Google Mobile Ads SDK version 19.0.1.
  • Fyber SDK version 7.5.2.

Version 7.5.0.0

  • Verified compatibility with Fyber SDK 7.5.0.
  • Fixed NullPointerException crash during Fyber ad loading.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Fyber SDK version 7.5.0.

Version 7.4.1.0

  • Verified compatibility with Fyber SDK 7.4.1.
  • Updated the minimum required Google Mobile Ads SDK version to 18.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Fyber SDK version 7.4.1.

Version 7.3.4.0

  • Initial release!
  • Supports Banner, Interstitial and Rewarded ads.

Built and tested with:

  • Google Mobile Ads SDK version 18.2.0.
  • Fyber SDK version 7.3.4.