The purpose of this article is to guide publishers who want to use the DT FairBid SDK to load and display ads from myTarget via DT FairBid Mediation.
myTarget currently supports the following ad formats:
- Banner
- Interstitial
- Rewarded
To integrate myTarget as DT mediated network:
- Step 1: Retrieve parameters from myTarget.
- Step 2: Add myTarget as a DT mediated network.
- Step 3: Add the myTarget SDK to your integration.
- Step 4: Test your integration.
Step 1: Retrieve myTarget Parameters
Before retrieving myTarget parameters, ensure that you have myTarget inventory by completing the following tasks in your myTarget dashboard::
- Create a myTarget account.
- Create your App in myTarget.
-
Create Ad Units for your app. Ensure that you specify the appropriate Integration type:
- SDK/Javascript for traditional waterfall mediation or
- In-app Bidding for SDK Bidding
To enable myTarget as a DT mediated network, obtain the Access Token
from your myTarget account. This token allows access to statistics API for all apps and ad units associated with your account. Save this token to a text file for later use in Step 2.
MYTARGET PARAMETER | REQUIRED FOR | DESCRIPTION |
---|---|---|
Access Token | Waterfall | Allows access to the statistics API of your all apps and ad units associated with your account. |
App ID |
|
Unique identifier for your app in the myTarget system. |
Slot ID |
|
Unique identifier for each ad unit you offer in your App. |
Obtaining the Access Token
- From your myTarget dashboard, go to Profile → Access Tokens.
- Click Show Token.
The Access Token displays.
- Copy the
Access Token
, and store the value in a text file. This value is required later in Step 2 to add myTarget as a DT mediated network.
Obtaining the App ID and Slot ID
- From your myTarget dashboard, click the Apps tab.
A list of your apps displays.
- For the app you want DT to mediate, copy the
App ID
, and store the value in a text file. This value is required later in Step 2 to add myTarget as a DT mediated network.
- From the Apps tab, click your App.
A list of slots associated with your App display.
- For each slot that you want DT to mediate, copy the associated
Slot ID
, and store the values in a text file. These values are required later in Step 2 to add myTarget as a DT mediated network.
Step 2: Add myTarget as DT Mediated Network
Before you add myTarget as a mediated network in DT FairBid:
- Ensure that you have access to parameters you retrieved from myTarget in Step 1.
- Add your App to the DT Console.
- Ensure that you have a DT Placement for each myTarget ad type you want to mediate with DT.
Note
myTarget allows you to configure the following Banner placements (slots) to offer banners on different devices:
- Banner Ad Unit is for banner ads (320x50) on phones.
- Leaderboard Ad Unit is for banner ads (728x90) on tablets.
To mediate both types of banner placements with DT, use a single DT Banner Placement, and add both myTarget slots as separate network instances.
To add myTarget as a DT mediated network:
- Log in to the DT Console, and click App Management.
- Add myTarget or myTarget Bidder as a mediated network for your app using the parameters you retrieved in Step 1.
-
Create an ad network instance for each placement you want to mediate with DT. Use the myTarget
Slot ID
you retrieved in Step 1 as the Instance ID.
Step 3: Adding the myTarget SDK to your Integration
To integrate the myTarget SDK, follow the instructions on the Supported Networks page.
Android Integrations
As of myTarget version 5.18.0, the minimum supported Android API is API Level 21. If your app uses an earlier version than Android API Level 21, DT sends a compilation error message similar to the following:
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than
version 21 declared in library [com.my.target:mytarget-sdk:5.18.0]
~/.gradle/caches/transforms-3/510343f8c577f4ba829d8544359f788b/
transformed/jetified-mytarget-sdk-5.18.0/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 21, or use
tools:overrideLibrary="com.my.target"
to force usage (may lead to runtime failures)
If you cannot increase the minimum supported Android API for your App or remove myTarget from your integration, DT and Gradle suggest using the following modification to the AndroidManifest to override any conflicts between myTarget and your application.
<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.my.target"/>
Warning
On devices running versions earlier than Android API Level 21, this modification prohibits the start the myTarget SDK which results in no fills from myTarget.
Step 4: Test Your Integration
Use the DT Test Suite to verify that you have set up your app properly for FairBid mediation. The DT Test Suite is available for Android, iOS, and Unity apps. For more information about using the DT Test Suite, see Test Suite.