1. How to determine a successful calltrackAppInstallinterface

First of all, you developers need to call in your ApptrackAppInstall interface, to collect $AppInstall event.iOS 和 Android document: App Channel tracking

Note:

(1) If accurate matching is used, the iOS side needs to enable IDFA permission (your App needs to introduce AdSupport library); The Android side needs to enable access to IMEI in the code (that is, dynamic application in the Android SDK documentation)android.permission.READ_PHONE_STATE ).

(2) You cannot assign utm attributes such as utm_soure directly in the trackAppInstall interface. If these assignment codes are added, when the App is activated, the channel matching will not be performed, but the property value will be set using the channel information filled in the code.

(3) The channel package information can be directly set to$AppInstall Attributes of the event, such as channel attributes downloadChannel:huawei.

For Android, you can upload a tagged channel package (apk package) to the app store to distinguish downloads from each channel. DownloadChannel can be used to document the channel of the download store. DownloadChannel is just an example. If you need more than one field to mark a channel package, add it as required by your business.


XML

AndroidManifest.xml 中: <meta-data android:name="YOUR_DOWNLOAD_CHANNEL" android:value="应用宝" />
CODE

1.1. Android side

After initializing the SDK, you can call the trackAppInstall() method to record the activation event, calling this method multiple times will only trigger the activation event on the first call:

JAVA

// 记录激活事件,无自定义属性 try { 	// 触发激活事件 SensorsDataAPI.sharedInstance().trackAppInstall(); } catch (Exception e) { e.printStackTrace(); } // 记录激活事件,有自定义属性 try { JSONObject properties = new JSONObject(); 	//这里的 DownloadChannel 负责记录下载商店的渠道,值应传入具体应用商店包的标记。如果没有为不同商店打多渠道包,则可以忽略该属性的代码示例。 properties.put("DownloadChannel", "XXX"); // 触发激活事件 SensorsDataAPI.sharedInstance().trackAppInstall(properties); } catch (Exception e) { e.printStackTrace(); } 
CODE

1.2. iOS side

After initializing the SDK, you can call the -trackAppInstall method to record the activation event. Calling this method multiple times will only trigger the activation event on the first call:

// 记录激活事件,无自定义属性 [[SensorsAnalyticsSDK sharedInstance] trackAppInstall]; // 记录激活事件,有自定义属性 [[SensorsAnalyticsSDK sharedInstance] trackAppInstallWithProperties:@{@"DownloadChannel": @"AppStore"}];
CODE

注意: When calling the trackAppInstall interface, be sure not to use  $utm_ Related attribute. If you want to track the promotion channel, you need to use the App channel link to track (the promotion channel link is generally created by the product operator)

$After AppInstall events are successfully collected, you can check whether corresponding AppInstall events (that is, App activation events) exist in the system:

2. How to switch trackAppInstall interface

2.1. Android side

The trackInstallation interface has been changed to trackAppInstall() to record activation events. Calling this method multiple times will only trigger the activation event on the first call:

// 记录激活事件,无自定义属性 try { 	// 触发激活事件 SensorsDataAPI.sharedInstance().trackAppInstall(); } catch (Exception e) { e.printStackTrace(); } // 记录激活事件,有自定义属性 try { JSONObject properties = new JSONObject(); 	//这里的 DownloadChannel 负责记录下载商店的渠道,值应传入具体应用商店包的标记。如果没有为不同商店打多渠道包,则可以忽略该属性的代码示例。 properties.put("DownloadChannel", "XXX"); // 触发激活事件 SensorsDataAPI.sharedInstance().trackAppInstall(properties); } catch (Exception e) { e.printStackTrace(); } 
CODE

2.2. iOS side

The trackInstallation interface has been changed to trackAppInstall to record activation events. Calling this method multiple times will only trigger the activation event on the first call:

// 记录激活事件,无自定义属性 [[SensorsAnalyticsSDK sharedInstance] trackAppInstall]; // 记录激活事件,有自定义属性 [[SensorsAnalyticsSDK sharedInstance] trackAppInstallWithProperties:@{@"DownloadChannel": @"AppStore"}];
CODE

2.3. Modification of event name

The event name has been changed from custom event "AppInstall" to built-in event "$AppInstall"

If the original recorded activation event name is not "$AppInstall", you need to use a virtual event to merge the original activation event with $AppInstall for data analysis. For more details, please consult the Sensory Support team.

3. How to match the App activation event with a successful channel in Sensory Query?Successfully Matched

In the corresponding project of Sensory Analytics, select AppInstall or App Activation Event, and view it as follows:

If the App activation event is matched successfully, the query result should display the correct utm channel parameter values, and the channel tracking matching mode should be precise matching. If they are not displayed at the same time, such as the ad campaign source being "unknown" or the channel tracking matching mode being fuzzy matching or "unknown", it indicates that the precise matching of channel tracking has failed.Please contact the Sensory Duty Officerfor further investigation of the precise matching failure.