Unity Ads

Introduction

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:

  1. Create or login to your Unity Ads Account
  2. Create an app in Unity Ads
  3. Create a placement for your app
  4. Retrieve the parameters from the Unity Ads dashboard
  5. Insert the Unity Ads parameters into the Fyber Console
  6. Add the Unity Ads SDK to your integration

Note

Unity Ads currently supports the following ad formats:

  • Interstitials
  • Rewarded Videos
  • Banners

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:

  1. Create an account with UnityAds, here.
  2. 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:

  1. On the Unity Dashboard, click Explore in the Monetize category:

  1. Click Create Project

  2. Give your new project a name

  3. Enter the name of the Project
  4. Confirm the COPPA regulation
  5. 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 videosRewarded videos and Banner ad types.

To view your placements or create new placements to run with Fyber Mediation:

  1. From the All Projects list, click on the project you just created or another app for which you want to create placements.

  1. In the left-side bar, click Placements

  1. Click Add Placement to open the Add Placement window

  1. Enter the details of the placement and select the placement type, it can be one of following: Rewarded videoInterstitial video or Banner

  1. When finished, click Create Placement and the details of your placement are displayed

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:

  1. From the Projects List, click the app for which you want to obtain the Game ID

  2. From the Project window, on the left-side bar, click Project Settings

  3. Scroll down the Project Settings window to the Game IDs

Obtaining the Organization Core ID

To retrieve the Organization Core ID:

  1. Click Settings in the left-side bar

  2. The Organization Settings window opens and displays the Organization Core ID.

Obtaining the Placement ID

To retrieve the Placement ID:

  1. On the left-side bar, click Placements

  2. In the Placements window, click the placement for which you want to obtain the ID

  3. In the General Settings window, the Placement ID is displayed.

Obtaining the Monetization API Access (API Key)

To retrieve the Monetization API Access:

  1. On the left-side bar, click Ads Data Export >> API Access

  2. The Monetization API Access is displayed:

Important

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.

  1. Sign-in to your Fyber account.
  2. Select your app from the App Management window.

  1. On the App Management page, click Mediated Networks.

  1. Select Unity Ads from the list

The Unity Ads Mediation window opens:

  1. Enter the Unity Ads app credentials and set the Instance name.

Instance name should be distinguishable in case you have multiple Unity Ads Instances.

  1. Click Save.
  2. 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

Warning

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:

<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.sample">

<uses-sdk tools:overrideLibrary="com.unity3d.ads"/>

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.

Warning

When running on devices below API 19, the SDK will proactively not start Unity Ads' SDK and will therefore always return no fills. 

 

Back to Top ⇧