Type Function
Return value none
Revision 2018.3333
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 (required)

Listener. Listener that will receive analyticsRequest events.

params (required)

Table. Table containing Flurry initialization values — see the next section for details.

Parameter Reference

The params table includes parameters for the Flurry initialization.

apiKey (required)

String. Your Flurry API key, gathered from the Flurry system.

crashReportingEnabled (optional)

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.

logLevel (optional)

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 )

-- Initialize the Flurry plugin
flurryAnalytics.init( flurryListener, { apiKey="YOUR_API_KEY" } )