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
See Ad Types and Placement ID for further information.
To integrate myTarget Ads as an Ad Network in DT FairBid:
- 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 1: Retrieve Parameters from myTarget
Before retrieving myTarget parameters, ensure that you have myTarget inventory by completing the following tasks in your myTarget dashboard::
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 | DESCRIPTION |
---|---|
Access Token | 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
To obtain the myTarget 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
Obtain the App ID
for your app and Slot IDs
for the slots that you want DT to mediatee.
To obtain the App ID
for your app and Slot IDs
for your ad slots:
- 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.
- Create a DT Placement for each myTarget placement you want to mediate with DT.
To add myTarget as a DT mediated network:
- Log in to the DT Console, and click App Management.
- Create a mediated network using the myTarget parameters you retrieved in Step 1, and click Save.
-
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.