Type Function Return value none Revision 2017.3060 Keywords analytics, attribution, Tenjin, init See also tenjin.*
tenjin.init()
initializes the Tenjin SDK.
Once initialized, you can call any of the other Tenjin API functions such as tenjin.logEvent().
tenjin.init( listener, params )
Listener. Listener that will receive analyticsRequest events.
Table. Table containing Tenjin initialization values — see the next section for details.
The params
table includes parameters for the Tenjin initialization.
local tenjin = require( "plugin.tenjin" ) local function tenjinListener( event ) -- Handle events here end -- Initialize plugin tenjin.init( tenjinListener, { apiKey="YOUR_API_KEY" } )