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
-
<application>
...
<meta-data android:name="tnkad_app_id" android:value="your-app-id-from-tnk-sites" />
<meta-data android:name="tnkad_tracking" android:value="true" />
...
</application>
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. Permissions
<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.
AndroidMenifest.xml
<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"> <intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter>
</receiver>
<meta-data android:name="tnkad_app_id" android:value="your-app-id-from-tnk-sites" />
<meta-data android:name="tnkad_tracking" android:value="true" /> </application>
[Required Invocation]
Invoke this method as soon as your app is started. This is a minimum requirement for analytics.
Method - void TnkSession.applicationStarted(Context context)
Description Call when application is started. This should be called prior to any other
API.
Parameters Name | Description | context | Activity 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.
Method - void TnkSession.actionCompleted(Context context, String actionName)
Description Call when specific action is made, First occurrence for each action is collected.
Parameters Name | Description | context | Activity or Context object | actionName | String 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 TnkSession.setUserAge(this,23);
// man TnkSession.setUserGender(this,TnkCode.MALE); // woman TnkSession.setUserGender(this,TnkCode.FEMALE);
|
|