Type Library Revision Release 2022.3683 Keywords analytics, attribution, AppsFlyer Platforms Android, iOS
The AppsFlyer is the world's leading mobile attribution & marketing analytics platform, helping app marketers around the world make better decisions.
Check out init parameter hasUserConsent
and also setHasUserConsent
method to enable GDPR data collection restrictions.
Before using this plugin, you'll need to register with AppsFlyer to receive an app ID and Developer Key.
According to Facebook's privacy policy, AppsFlyer (or any other 3rd party mobile measurement partner) cannot provide user-level attribution for Facebook installs unless you accept Facebook's Terms of Service. More info here.
If you choose not to accept the Terms of Service, Facebook Mobile Ads installs are categorized as ‘Organic’ and you are unable to receive the user level data for Facebook installs.
local appsflyer = require( "plugin.appsflyer" )
To use this plugin, add the following entry into the plugins
table of build.settings
. When added, the build server will integrate the plugin during the build phase.
settings = { plugins = { ["plugin.appsflyer"] = { publisherId = "com.coronalabs" }, }, }
To use strict mode for iOS include this in build.settings
instead for the above. The strict mode version of the plugin include the regular plugin.appsflyer
for Android so there is no need to include both plugins.
settings = { plugins = { ["plugin.appsflyer.strict"] = { publisherId = "com.coronalabs" }, }, }
Lastly you need to tweak the module name for require function
local appsflyer = require( "plugin.appsflyer.strict" )
For iOS, when submitting your app to the App Store, follow these guidelines:
For Android, the following permissions/features are automatically added when using this plugin:
"android.permission.INTERNET"
"android.permission.ACCESS_NETWORK_STATE"
"android.permission.ACCESS_WIFI_STATE"
"com.google.android.gms.permission.AD_ID"
To remove "com.google.android.gms.permission.AD_ID"
add the following to you build.settings
settings = { android = { manifestChildElements = { [[ <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/> ]], }, }, }