myTarget Integration Guide

This guide will instruct you step-by-step on how to set myTarget live as an ad network on Unity LevelPlay.

Before you start
  • The required Gradle Build Tool is 3.5.4+

Step 1. Create a myTarget account

  1. To create an account with myTarget, go here
  2. Once your account has been verified, login to your partner account here.

Step 2. Create an application in myTarget

Follow these steps to create your myTarget application:

  1. In your myTarget  account go to  Apps Create an app

  2.  Once you set a new app, you’ll be able to retrieve your ‘Placement id’ and  ‘Slot id’ – In order to set in Unity LevelPlay

Step 2.Retrieve Your myTarget Access key

  1. In your myTarget account go to Profile  Access Token

Step 3. Activate myTarget in your mediation setup module

Inside the ironSource platform, access the SDK Networks setup to configure myTarget parameters into your ironSource account.

  1. Once you have all the required parameters, log in to your ironSource account and go to Monetize ➣ Setup ➣ SDK Networks

  2. Select myTarget from the table of Available Networks , add the parameters, and click on the Activate button. Then click Save.
  3. Select myTarget from the list of ad networks and click Setup.
  4. Enter your myTarget app’s ‘Access token’, then for each adunit the ‘Slot ID’ and ‘Placement ID’. Set the status to Active and click Save.You’ll see myTarget listed as Active for Mediation on your Setup dashboard.

Step 4. Integrate the ironSource Mediation Network Adapters

 ironSource supports both Gradle dependencies and manual download mechanisms.

Gradle 

implementation 'com.ironsource.adapters:mytargetadapter:4.1.19'
implementation 'com.my.target:mytarget-sdk:5.20.0'
implementation 'com.google.android.exoplayer:exoplayer:2.17.1'

Manual Download

  1. Add the myTarget Adapter and SDK to your build. You can find the latest myTarget files here. .
  2. Add myTarget Adapter and SDK to your Android Project. After you download the Adapter; drop the myTarget adapter AAR into the libs folder in your Android Project.
  3. Make sure to add the following to your Gradle build file under the dependencies section:
    implementation 'com.ironsource.adapters:mytargetadapter:4.1.19'
    implementation 'com.my.target:mytarget-sdk:5.20.0'
    implementation 'com.google.android.exoplayer:exoplayer:2.17.1'
    

  4. Add the SDK AAR into your project.
    1. If using Eclipse: Import the .AAR file as a library project.
    2. If using Android Studio, download the myTarget .AAR file and add as a dependency to your own module. Go to FileNewNew ModuleImport .AAR and navigate to the location where the Smaato .AAR file has been downloaded.

For Proguard Users Only

If you are using ProGuard with the myTarget adapter, you must add the following code to your ProGuard file:

-keep class com.my.target.** {*;}

Step 5. Update AndroidManifest.xml

Manifest Permissions:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <queries>
        <package android:name="com.android.chrome" />
    </queries>

Manifest Activities:

Add the following activities inside the <application> tag on your manifest:

    <activity>
        android:name="com.my.target.common.MyTargetActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
    </activity>