Record activation events
You can call the trackAppInstall() method to record activation events. Calling this method multiple times will only trigger the activation event on the first call:
improt sensors from 'sensorsdata-analytics-react-native'; async requestPermissions() { try { await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE, { title: '申请权限', message: '', buttonPositive: '同意', }, ); } catch (err) { console.log(err); } sensors.trackAppInstall() }
Whether the application permission request is successful or not, you need to call trackAppInstall():
- If the original recorded activation event name is not $AppInstall, you need to use Copy from .Virtual Event (new) v2.5 to merge the original activation event and $AppInstall for data analysis. For more details, please consult Sensors Data technical support
- For more information about the channel tracking feature, please refer to Channel Tracking.