11function init ()
2- m .TAP_SDK_VERSION = "1.0.1 "
2+ m .TAP_SDK_VERSION = "1.1.0 "
33 m .top .id = "tap"
44
55 m .messagePort = _createPort ()
@@ -126,7 +126,7 @@ end function
126126function Taplytics () as Object
127127 prototype = {}
128128
129- prototype .TAP_SDK_VERSION = "1.0.1 "
129+ prototype .TAP_SDK_VERSION = "1.1.0 "
130130 prototype .PLAYER_SOFTWARE_NAME = "RokuSG"
131131 prototype .TAP_API_VERSION = "2.0"
132132 prototype .PLAYER_IS_FULLSCREEN = "true"
@@ -194,7 +194,7 @@ function Taplytics() as Object
194194
195195 prototype .logEvent = function (data as Object )
196196 if m ._top .enablePrint then print "ENTER logEvent>>>"
197- m ._postClientEvents (data )
197+ m ._postClientEvents ("goalAchieved" , data )
198198 end function
199199
200200 prototype .resetAppUser = function ()
@@ -384,18 +384,18 @@ function Taplytics() as Object
384384
385385 end function
386386
387- prototype ._postClientEvents = function (queryParameters as Object )
387+ prototype ._postClientEvents = function (eventType as Object , queryParameters as Object )
388388
389389 ' t - Taplytics API Key ● API Key
390390 ' sid - Session_id
391391 ' e - Array of events
392- ' type - type of the event (String)
393- ' gn - goal name (String)
394- ' date - current date (Date)
395- ' val - numerical value (Double)
396- ' data - metaData (JSON Object)
397- ' prod - is prod, not live update (Boolean)
398- ' sid - session_id (String)
392+ ' type - type of the event (String)
393+ ' gn - goal name (String)
394+ ' date - current date (Date)
395+ ' val - numerical value (Double)
396+ ' data - metaData (JSON Object)
397+ ' prod - is prod, not live update (Boolean)
398+ ' sid - session_id (String)
399399
400400 requiredParamaters = {}
401401
@@ -407,7 +407,10 @@ function Taplytics() as Object
407407
408408 'create event
409409 event = {}
410- event .type = "goalAchieved"
410+
411+ event .type = eventType
412+ print "event type: " , event .type
413+
411414 if queryParameters .DoesExist ("eventName" ) and queryParameters .eventName <> ""
412415 event .gn = queryParameters .eventName
413416 end if
@@ -488,6 +491,9 @@ function Taplytics() as Object
488491 m ._top .clientConfig = m ._variables
489492 if m ._top .enablePrint then print m ._variables
490493 m ._clientConfigReady = true
494+
495+ m ._postClientEvents ("appActive" , {})
496+
491497 end if
492498 end function
493499
0 commit comments