1) Android Integration

To apply T-MAT, be sure that you already finished both adding your app and SDK settings.

[Basic settings]
  • Put the tnkad_tracking value as 'true' in <meta-data/> inside of <application/> tag at AndroidMenifest.xml file.
  • If you don't want to use T-MAT anymore, just simply change the value to 'false'.

App ID & Tracking option

    <meta-data android:name="tnkad_app_id"  android:value="your-app-id-from-tnk-sites" />
    <meta-data android:name="tnkad_tracking" android:value="true" />

The Google Install Reference Library is required to understand the inflow path of the app. Set the library in build.gradle (Module: app) as shown below.
- Only apps downloaded from GooglePlay are provided with acquisition path identification.
dependencies {
    ... implementation 'com.android.installreferrer:installreferrer:1.1' ...

Check if you put <user-permission/> as follows. Add <user-permission/> tags if you didn't yet.
- The BIND_GET_INSTALL_REFERRER_SERVICE privilege is required to use the app's manned path function.


<uses-permission android:name="android.permission.INTERNET" />

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" />

AndroidMenifest.xml file may look like as follows.


<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapplication" android:versionCode="110" android:versionName="1.10" >

    <uses-sdk android:minSdkVersion="9"/>

    <uses-permission android:name="android.permission.INTERNET" /> 

    <uses-permission android:name="android.permission.READ_PHONE_STATE" />       

    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

    <application android:icon="@drawable/ic_launcher" android:label="@string/app_name"

        ... your activities ...

        <receiver android:name="com.tnkfactory.ad.TnkReceiver" android:exported="true"


                <action android:name="com.android.vending.INSTALL_REFERRER" /> 



        <meta-data android:name="tnkad_app_id" android:value="your-app-id-from-tnk-sites" />

        <meta-data android:name="tnkad_tracking" android:value="true" />    



[Required Invocation]

Invoke this method as soon as your app is started. This is a minimum requirement for analytics.

  - void TnkSession.applicationStarted(Context context)

   Call when application is started. This should be called prior to any other API.

 Name Description
 contextActivity or Context object

[Funnel Analytics]

Call below API to receive data about depth of user action. For example, action such as log- in, item purchase and recommendation can be called.

  - void TnkSession.actionCompleted(Context context, String actionName)

   Call when specific action is made, First occurrence for each action is collected.

 Name Description
 contextActivity or Context object
 actionNameString representing user action( "user_login" for example)
You must register this name in the page of Funnel Analytics of Report menu at Tnk site.

actionCompleted Samples

// resource data downloaded

TnkSession.actionCompleted(this, "resource_loaded");

// signed up 

TnkSession.actionCompleted(this, "signup_completed");

// profile entered

TnkSession.actionCompleted(this, "profile_entered");

// friend invitation 

TnkSession.actionCompleted(this, "friend_invite"); 

[User Information]

If you set user demographic, you can find more informative data. 

Setting Users Info

// age


// man 


// woman