The SOOMLA SDK
How it works?
Once the SOOMLA SDK is initialized, it automatically detects which ad networks' SDKs are integrated in the app. For each one of these Ad Networks' SDKs, the SOOMLA SDK knows exactly how to listen to all events and attributes it needs to collect in order to allow the SOOMLA Platform to work.
SOOMLA keeps improving it's SDKs and methods trying to make it as easy as possible on your R&D teams to integrate and operate its SDK. Each time an ad networks changes its SDK logic, SOOMLA also adapts to those changes so data collection will continue normally.
SDK Integration Steps:
(article: Creating a new App in Dashboard)
1. Add the SOOMLA SDK to your App:
Download the Agent and import soomla-unity3d-traceback-vx.x.x.unitypackage into your Unity3D project.
**Note - In SDK version 5.7.6 please make sure to remove libAFNetworking.a from unity project.
Updated
When using AndroidX with Jetifier enabled please exclude soomla by adding the following line to your configuration (please use gradle plugin version 3.5.0):
android.jetifier.blacklist=com.soomla*
Note - gradle plugin version 3.5.0 is available from Unity 2018.4.24f1 by Providing a custom Gradle build template and unchecking the following option in Unity:
Preferences -> External Tools -> Gradle Installed with Unity
If you are not planning on using gradle, please add the following line instead:
android.jetifier.blacklist=SoomlaTraceback*
Proguard
If Soomla is integrated manually and Proguard is used to obfuscate your code for other ad networks, the following Proguard rules should be added to your proguard config:
-keep class com.soomla.traceback.** { *;}
-keep public class com.soomla.traceback.unity.* { public *;}
-dontwarn com.soomla.traceback.**
# For AdColony integration
-keep class com.jirbo.adcolony.* { static *;}
#For AerServ integration
-keepclassmembers class com.aerserv.sdk.utils.UrlBuilder { static *;}
#For AmazonAps integration
-keep class com.amazon.device.ads.DtbThreadService {static *;}
#For AppLovin integration
-keepclassmembers class com.applovin.sdk.AppLovinSdk { static *;}
#For Facebook integration
-keepclassmembers class com.facebook.ads.internal.AdSdkVersion { static *;}
-keepclassmembers class com.facebook.ads.internal.settings.AdSdkVersion { static *;}
#For HyprMX integration
-keepclassmembers class com.hyprmx.android.sdk.utility.HyprMXProperties { static *;}
-keepclassmembers class com.hyprmx.android.BuildConfig { static *;}
#For Lifestreet integration
-keepclassmembers class com.lifestreet.android.lsmsdk.SlotController { static *;}
#For Millennialmedia integration
-keepclassmembers class com.millennialmedia.MMSDK { static *;}
#For Smaato integration
-keepclassmembers class com.smaato.soma.bannerutilities.constant.Values { static *;}
#For Verizon integration
-keepclassmembers class com.verizon.ads.edition.BuildConfig {static *;}
#For Vungle integration
-keepclassmembers class com.vungle.publisher.VunglePub { static *;}
# In case you use Kochava for Attribution
-keep class com.kochava.android.tracker.Tracker
-keep class com.kochava.android.tracker.InputParams
-keep class androidx.localbroadcastmanager.content.LocalBroadcastManager { *;}
-keep class androidx.recyclerview.widget.RecyclerView { *;}
-keep class androidx.recyclerview.widget.RecyclerView$OnScrollListener { *;}
-keep class android.support.v7.widget.RecyclerView { *;}
-keep class android.support.v7.widget.RecyclerView$OnScrollListener { *;}
-keep class android.support.v4.content.LocalBroadcastManager { *;}
-keep class com.android.internal.util.Predicate { *;}
2. Initializing the SDK:
Additionally, Soomla SDK should be initialized on the Main thread or on the same thread as other ad network SDKs.
void Awake ()
{
// Get the appKey from the App's Settings page.
string appKey = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
// Initialize
Soomla.Traceback.SoomlaTraceback.Initialize(appKey);
...
}
That's it! SOOMLA will now collect and send all relevant ads events!
3. SDK Call-Back events
SoomlaSdkInitCallback:
The Callback will be called once Soomla SDK was successfully initialized.Note: It usually takes a few seconds to initialize Soomla SDK (1~10 seconds) depending on the number of Ad Network SDKs used. Keep in mind, delays can also be caused by network connectivity issues.
public class SoomlaSdkInit : ISoomlaSdkInitCallback { public void onSuccess() { Debug.Log ("unity: onSuccess"); } public void onFailed(SoomlaSdkInitError soomlaSdkInitError, string errorMessage) { Debug.Log ("unity: onFailed " + soomlaSdkInitError + " message: " + errorMessage); } } this.soomlaSdkInit = new SoomlaSdkInit(); var config = new SoomlaConfig { SoomlaSdkInitCallback = soomlaSdkInit }; SoomlaTraceback.Initialize(appKey, soomlaConfig);
Android permissions
If you build for Android, Make sure you have the following permissions in yourAndroidManifest.xml:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
Next steps: