flurryAnalytics.startTimedEvent()

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

Overview

Use this function to start a timed event. This can be useful to determine how long a user stays within a certain section of your app, for example a game level. Additional event parameters can be passed as key-value pairs within a table.

Timed events can be ended via the flurryAnalytics.endTimedEvent() function.

Syntax

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

String. The timed event to start.

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

-- Start a timed event
flurryAnalytics.startTimedEvent( "Level 1", { skill="Beginner" } )