flurryAnalytics.logEvent()

Type Function
Return value none
Revision 2018.3381
Keywords analytics, Flurry Analytics, logEvent
See also flurryAnalytics.startTimedEvent()
flurryAnalytics.*

Overview

Use this function to record certain events which occur during a session of your application and pass dynamic parameters associated with the event. Event parameters can be passed as key-value pairs within a table.

Syntax

flurryAnalytics.logEvent( event [, params] )
event (required)

String. The event to record.

params (optional)

Table. Table containing optional values associated with the event.

Example

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" } )

-- Log an event
flurryAnalytics.logEvent( "Menu selection", { location="Main Menu", selection="Multiplayer mode" } )