tenjin.logEvent()

Type Function
Return value none
Revision Release 2024.3703
Keywords analytics, attribution, Tenjin, logEvent
See also tenjin.init()
tenjin.logPurchase()
tenjin.*

Overview

Sends an event to Tenjin.

Syntax

tenjin.logEvent( eventName [, eventValue] )
eventName (required)

String. The name of the event.

eventValue (optional)

Number. An optional event value. Must be an integer. The Tenjin system will use this value to sum up and track averages for the eventName given.

Example

local tenjin = require( "plugin.tenjin" )

local function tenjinListener( event )
    -- Handle events here
end

-- Initialize plugin
tenjin.init( tenjinListener, { apiKey="YOUR_API_KEY" } )

tenjin.logEvent( "myEvent" )