Type Function Return value none Revision Release 2024.3703 Keywords analytics, Flurry Analytics, init See also flurryAnalytics.*
This function initializes the Flurry plugin and it must be executed before making other Flurry calls such as flurryAnalytics.logEvent().
You must wait for the "init"
phase event before trying to log analytics events (flurryAnalytics.logEvent()) or start timed events (flurryAnalytics.startTimedEvent()).
flurryAnalytics.init( listener, params )
Listener. Listener that will receive analyticsRequest events.
Table. Table containing Flurry initialization values — see the next section for details.
The params
table includes parameters for the Flurry initialization.
Boolean. Set to true
to enable crash analytics. This will enable your app to send crash data and unhandled errors to Flurry. Default is false
.
String. Sets the logging level. Default is minimal logging with critical messages only. Possible values include "default"
, "debug"
, or "all"
.
local flurryAnalytics = require( "plugin.flurry.analytics" ) local function flurryListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Flurry plugin flurryAnalytics.init( flurryListener, { apiKey="YOUR_API_KEY" } )