01/10/2025 10:53:00
AppsFlyer Channel Function Description
II. Developer Platform Configuration
[info] AppsFlyer's official website is: https://www.appsflyer.com
For Android system, after MSDK5.9 version, due to the restrictions of the official AppsFlyer-SDK, the MSDKAppsFlyer module does not support internal build method for packaging.
2.1 Register an Account
Appsflyer is a paid platform. The game needs to apply for an account by itself. Skip to Appsflyer official website, and follow the prompts to create an account
Tencent internal contact: kchuang (Huang Jiaqi)
2.2 Create an App
According to Appsflyer's official guide documentation https://support.appsflyer.com/hc/en-us/articles/207377436, add new app
2.3 Get app Configuration Information
Get app's App Key
III. Android Project Configuration
[info] AppsFlyer SDK integration-Android: https://support.appsflyer.com/hc/en-us/articles/207032126-AppsFlyer-SDK-Integration-Android
For Android system, after MSDK5.9 version, due to the restrictions of the official AppsFlyer-SDK, the MSDKAppsFlyer module does not support internal build method for packaging.
3.1. Permission Configuration
[Required] Permission list
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android: name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
[Optional] Hardware information access permission
<uses-permission android: name="android.permission.READ_PHONE_STATE" />
[info]
READ_PHONE_STATE
is sensitive permission, mainly used to get and track Android hardware device information
3.2. Appsflyer App ID Configuration
In project file assets/MSDKConfig.ini, add configuration
[AppsFlyer debugging configuration]
MSDK_DEBUG = 1
MSDK_DEBUG_CHANNEL = AppsFlyer
[AppsFlyer configuration ]
APPSFLYER_KEY={YOUR_APPSFLYER_KEY}
[info]
{MSDK_DEBUG_CHANNEL}
This switch is set to AppsFlyer, which means to enable AppsFlyer debugging. This switch takes effect only when {MSDK_DEBUG} is 1. They are in the same configuration file
{YOUR_APPSFLYER_KEY}
needs to be modified to the game's App Key, which can be found in the AppsFlyer console
3.3. Receiver Configuration
In AndroidManifest.xml, if there is no
com.android.vending.INSTALL_REFERRER
configuration, add the following Receiver configuration<receiver android:name="com.appsflyer.SingleInstallBroadcastReceiver" android:exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver>
In AndroidManifest.xml, if there is already
com.android.vending.INSTALL_REFERRER
configuration, add the following Receiver configuration<receiver android: name="com.appsflyer.MultipleInstallBroadcastReceiver" android: exported="true"> <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver>
3.4. GMS Dependency Version Configuration
<meta-data android:name="com.google.android.gms.version"android:value="@integer/google_play_services_version" />
[info] Normally, no modification is required. If there are special requirements, you can modify it according to the version in GMS plugin package.
3.5. [Optional] Track the Uninstallation Information Configuration. This Function Depends on Google Push Service:
1、Add FCM Sender ID (can be found in FireBase console) In project file assets/MSDKConfig.ini, add configuration
```ini
[AppsFlyer configuration ]
FIREBASE_SENDER_ID={YOUR_FIREBASE_SENDER_ID}
```
> **[info]** `{YOUR_FIREBASE_SENDER_ID}` needs to be modified into the business' FireBase Sender ID
2、Get push Token and call AppsFlyer interfaces. Please refer to the description of Uninstallation, Installation and Tracking in the function description: Https://support.appsflyer.com/hc/en-us/articles/210289286#AndroidUninstall
[info] GCM is disused. Use GCM's upgraded version FCM
3.6 [Optional] Obtain the configuration related to IMEI and ANDROID_ID
1) IMEI
Since READ_PHONE_STATE permission is required to obtain IMEI, AppsFlyer does not obtain IMEI by default. But if the game needs to report IMEI, it can add the configuration about IMEI in the project file assets/MSDKConfig.ini
[AppsFlyer configuration]
APPSFLYER_APP_IMEI_ENABLE=1
2) ANDROID_ID
Since ANDROID_ID is very important for reporting and does not require READ_PHONE_STATE permission, AppsFlyer will obtain ANDROID_ID by default. But if the game does not need to report ANDROID_ID, it can add the configuration about ANDROID_ID in the project file assets/MSDKConfig.ini
[AppsFlyer configuration]
APPSFLYER_APP_ANDROID_ID_ENABLE=0
IV. iOS Project Configuration
4.1 MSDKConfig Configuration File
In the project, find MSDKAppSetting.bundle/MSDKConfig.ini file, and add the following configuration
[Appsflyer channel configuration ]
MSDK_DEBUG = 1
MSDK_DEBUG_CHANNEL = AppsFlyer
[AppsFlyer configuration ]
APPSFLYER_APP_ID_IOS = {YOUR_APPSFLYER_APPID}
APPSFLYER_APP_KEY_IOS = {YOUR_APPSFLYER_KEY}
[info]
{MSDK_DEBUG_CHANNEL}
This switch is set to AppsFlyer, which means to enable AppsFlyer debugging. This switch takes effect only when {MSDK_DEBUG} is 1. They are in the same configuration file
{YOUR_APPSFLYER_APPID}
needs to be modified to the game's appid, which can be found in the AppsFlyer console
{YOUR_APPSFLYER_KEY}
needs to be modified to the game's App Key, which can be found in the AppsFlyer console
4.2. System Library Dependency
+ AdSupport.framework
+ iAd.framework
4.3. [Optional]DeepLinking Reporting Function Support
To support DeepLinking reporting, you need to make App support Universal Links at first. As for the content of this section, refer to Appsflyer Reference Documentation
V. Function Description
5.1 Data reporting
- For data reporting, please refer to Event Reporting Module.
5.2. Uninstallation & Installation Function Description
Android integration description
AppsFlyer's uninstallation & installation function is dependent on FireBase push. The game needs to follow up on its own push component to get push Token
To implement AppsFlyer's uninstallation & installation function, the game needs to call the SetPushToken interface of AppsFlyer's extension interfaces:
[info]
YOUR_PUSH_TOKEN
is FireBase push Token gotten by the push component
VI. FAQs
6.1 Event Reporting Restrictions
For the same device and the same app, an event will only be displayed once if its reporting interval is within 10 seconds.
For different devices and the same event, there is no such restriction and all events will be recorded in real time;
[Warning] Note: Appsflyer sets this restriction based on statistics. It assumes that normal users cannot execute the same event multiple times within 10 seconds.
6.2 Different Installation Modes
Both organic and non-organic data are recorded in Appsflyer dashboard at the same time.
Organic refers to the installation of an app in a natural way, not via the ad links promoted by AppsFlyer, such as direct installation; Non-organic is the installation of an app via the ad link promoted by AppsFlyer.
The corresponding in-app event of organic does not appear in the report of the in-app event downloaded directly in our dashboard, because that downloaded via the in-app event is the information related to the corresponding in-app event of non-organic
6.3 AppsFlyer's Official Documentation
Access documentation
- As for how to access Android, please refer to: AppsFlyer integration official website (Android)
- As for how to access iOS, please refer to: AppsFlyer integration official website (iOS)
Test documentation made before app is released to App Store
- As for Android test documentation made before app is released to Google Play Store, please refer to: AppsFlyer test (Android) (before being released to App Store)
- As for iOS test documentation made before app is released to App Store, please refer to: AppsFlyer test (iOS) (before being released to App Store)
Test documentation made after app is released to App Store
- As for Android test documentation made after app is released to Google Play Store, please refer to: AppsFlyer test (Android) (after being released to App Store)
- As for iOS test documentation made after app is released to App Store, please refer to: AppsFlyer test (iOS) (after being released to App Store)
Since MSDK does not actually deliver any ads, app can only be tested in the way used before the app is released to App Store. In order to verify the normality and validity of the data, a game needs to actually deliver and publish ads. It is needed to test the game according to the post-release process after ads are delivered, so as to verify the correctness of the data and the ad delivery.
6.4 Contact Appsflyer
If you need to contact AppsFlyer to troubleshoot your data, you had better provide the following data:
- app id
- The viewed time period
- Event ID
- Device IDFA
- Package name (test the pid field in the link, such as id1089079153 in
https://app.appsflyer.com/id1089079153?pid=locky0508-2&idfa=A56EC65B-DF48-42F4-B74C-DCE6B818E729
is not bundleid or packagename)
6.5 Verify Test Data
1.View data
- Overall preview data
- AppsFlyer reporting event data
- Export data
6.6 Android Platform Depends on Google Services
For Android platform, using AppsFlyer requires that the mobile phone must be installed with Google services, so please go to mobile phones installed with Google services to conduct AppsFlyer access test.
All rights reserved.