Type Function Return value none Revision Release 2024.3703 Keywords analytics, attribution, AppsFlyer, init See also appsflyer.*
appsflyer.init()
initializes the AppsFlyer SDK.
Once initialized, you can call any of the other AppsFlyer API functions such as appsflyer.logEvent().
appsflyer.init( listener, params )
Listener. Listener that will receive analyticsRequest events.
Table. Table containing AppsFlyer initialization values — see the next section for details.
The params
table includes parameters for the AppsFlyer initialization.
String. Your AppsFlyer App GUID, gathered from the AppsFlyer system. Note that you need to set the app ID here with digits only, without the id
prefix.
String. Your AppsFlyer Developer Key, gathered from the AppsFlyer system.
Boolean. Debug logging will display extra information in the device log for easier troubleshooting. Default is false
.
Boolean. To ease work with GDPR compliance of your app, change this init parameter to the needed value. If set to false
, AppsFlyer will enable GDPR data collection restrictions, set to true
for opposite. Default is false
.
local appsflyer = require( "plugin.appsflyer" ) local function appsflyerListener( event ) -- Handle events here end -- Initialize plugin appsflyer.init( appsflyerListener, { appID = "YOUR_APP_ID", devKey = "YOUR_DEV_KEY", enableDebugLogging = true, hasUserConsent = true } )