The purpose of this article is to guide publishers who want to use the Fyber FairBid SDK to load and display ads from Unity Ads via FairBid mediation.
This is a six-step process:
- Create or login to your Unity Ads Account
- Create an app in Unity Ads
- Create a placement for your app
- Retrieve the parameters from the Unity Ads dashboard
- Insert the Unity Ads parameters into the Fyber Console
- Add the Unity Ads SDK to your integration
Unity Ads currently supports the following ad formats:
- Rewarded Videos
Refer to Unity Ads for updates on supported ad formats.
Step 1: Create or login to your Unity Ads Account
To create a Unity Ads account, follow these steps:
- Create an account with UnityAds, here.
- Once your account has been verified, log in at their partner login here.
Step 2: Creating an App in Unity Ads
To create an app in Unity Ads, follow these steps:
- Click Create Project
- Give your new project a name
- Enter the name of the Project
- Confirm the COPPA regulation
- Click Create Project
The project you just create appears in the list of projects.
Step 3: Creating a Placement for your App
Unity Ads creates two default placements: one for Video (Interstitial on the Unity Ads Dashboard) and one for Rewarded Video.
FairBid SDK supports Interstitial videos, Rewarded videos and Banner ad types.
To view your placements or create new placements to run with Fyber Mediation:
- From the All Projects list, click on the project you just created or another app for which you want to create placements.
- Enter the details of the placement and select the placement type, it can be one of following: Rewarded video, Interstitial video or Banner
Step 4: Retrieve the Parameters from the Unity Ads Dashboard
To enable Unity Ads to work as an Ad Network with Fyber, you must obtain three parameters from your Unity Ads account and later insert them into the Fyber Console.
Set out below are the details of what parameters are required, how and where to obtain them.
|Unity Ads Parameter||Description|
|Game ID||The unique identifier of your Application in Unity Ad’s system.|
|Organization ID||The unique identifier of your organization in the Unity Ad's system.|
|Placement ID||The unique identifier of your Ad Placement in Unity Ad’s system. Two Ad Placements are created by default in Unity Ads for your application; a Rewarded and Non-Rewarded placement.|
|API Key||A unique identifier for your Unity Ads account, which allows Fyber to import performance data from your UnityAds account .|
Alternatively, watch and listen to the video below to find out how to obtain the required parameters:
Obtaining the Game ID
To retrieve the Game ID:
- From the Projects List, click the app for which you want to obtain the Game ID
- From the Project window, on the left-side bar, click Project Settings
- Scroll down the Project Settings window to the Game IDs
Obtaining the Organization Core ID
To retrieve the Organization Core ID:
- Click Settings in the left-side bar
- The Organization Settings window opens and displays the Organization Core ID.
Obtaining the Placement ID
To retrieve the Placement ID:
- On the left-side bar, click Placements
- In the Placements window, click the placement for which you want to obtain the ID
- In the General Settings window, the Placement ID is displayed.
Obtaining the Monetization API Access (API Key)
To retrieve the Monetization API Access:
Shortly, Unity Ads are deprecating the Monetization API Access and replacing it with the Reporting API Access. See below for details.
The Reporting API Key is found in the same location as the Monetization API Access.
Now that you have obtained the required parameters, you can complete the configuration of Unity Ads in your Fyber Account.
Step 5: Insert the Unity Ads Parameters into the Fyber Console
To enter the parameters obtained from Unity Ads and insert them into the Fyber Console, follow these steps.
- Sign-in to your Fyber account.
- Select your app from the App Management window.
- On the App Management page, click Mediated Networks.
- Select Unity Ads from the list
The Unity Ads Mediation window opens:
- Enter the Unity Ads app credentials and set the Instance name.
Instance name should be distinguishable in case you have multiple Unity Ads Instances.
- Click Save.
- To complete the set up, you must associate the network instance that you just created to the relevant Placement set up on the Fyber dashboard. For a detailed guide click here.
Step 6: Adding the Unity Ads SDK to your integration
To add the Unity Ads SDK go to the Supported Networks page and follow the guide while selecting the Configuration for Unity Ads.
Android: minimum supported API version
Starting on version 3.5.0 , Unity Ads' minimum supported API version is 19
Depending on your build requirements some actions might be required
If your app's minimum supported API version is below 19, you'll see the following compilation error
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.unity3d.ads:unity-ads:3.5.1] /Users/user/.gradle/caches/transforms-2/files-2.1/ead8d3090140b34c4c0a49b2c10999cf/unity-ads-3.5.1/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="com.unity3d.ads" to force usage (may lead to runtime failures)
If raising your applications's minimum supported version is not an option, nor is it removing Unity Ads from your integration, we suggest the following workaround:
This AndroidManifest will override any conflicting Manifest configuration coming from Unity Ads with the ones defined in your application (that includes minimum supported API version).
Despite being the suggested solution (from both Fyber and Gradle ) this comes with potentially side effects and should be used wisely.
When running on devices below API 19, the SDK will proactively not start Unity Ads' SDK and will therefore always return no fills.