Omniture integration with RSG_Analytics failing:
Thanks in advance for any assistance!
I'm attempting to add Omniture tracking into my app using the Roku Analytics component as described in the sdk here:
https://sdkdocs.roku.com/display/sdkdoc ... +ComponentFollowing the sdk and the sample channels, I was able to initiate an analytics node and send a number of properly formatted trackEvents() with the debug flag on using a dummy baseUrl. Unfortunately, after I switched to the real baseUrl which returned header information to parse, the header parsing called the validStr() function which is not defined in the Roku Analytics node scope. The runtime threw a function call operator runtime error and crashed as shown below, and I'm not sure how to fix this as this is all internal to the Roku Analytics library...
Device: 3600X, Firmware version: 8.10 build 4145
sub NWM_OMNITURE_ProcessMessages()
125: while true
126: msg = m.port.GetMessage()
127: if msg = invalid
128: exit while
129: end if
130: if m.debug then ? "NWM_Omniture: got " + type(msg)
131:
132: if type(msg) = "roUrlEvent" ' should always be true
133: headers = msg.GetResponseHeadersArray()
134: for each header in headers
135: if header.DoesExist("set-cookie")
136:*
cookies = ValidStr(header.Lookup("set-cookie"))137: rx = Createobject("roRegEx", "(s_vi=.*?);", "")
138: matches = rx.Match(cookies)
139: if matches.Count() > 1
140: m.cookie = matches[1]
141: if m.debug then ? "NWM_Omniture: found cookie " + m.cookie
142: exit for
143: end if
144: end if
145: next
146: end if
147: end while
148: end sub
Function Call Operator ( ) attempted on non-function. (runtime error &he0) in /tmp/plugin/PCAAAACt86sB/pkg:/components/libs/NWM_Omniture.brs(136)136: ??
Backtrace:
#6 Function nwm_omniture_processmessages() As Void
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/libs/NWM_Omniture.brs(136)
#5 Function nwm_omniture_logevent(params As Dynamic) As Dynamic
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/libs/NWM_Omniture.brs(76)
#4 Function omniture_eventhandler(params As Dynamic) As Object
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/handlers/Omniture.brs(42)
#3 Function roku_analytics_component__callfunction(analyticid As String, functionname As String, value As Object) As Void
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/AnalyticsNode.brs(328)
#2 Function roku_analytics_component__ontrackevent(params As Dynamic, node As Dynamic) As Dynamic
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/AnalyticsNode.brs(205)
#1 Function analytics_utils__processregisterednodecallback(event As Object) As Void
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/AnalyticsUtils.brs(288)
#0 Function analyticsnode_eventhandler() As Void
file/line: /tmp/plugin/PCAAAACt86sB/pkg:/components/AnalyticsNode.brs(154)
Local Variables:
global Interface:ifGlobal
m roAssociativeArray refcnt=5 count:9
msg bsc:roUrlEvent refcnt=1
headers roArray refcnt=3 count:33
header roAssociativeArray refcnt=2 count:1
cookies <uninitialized>
rx <uninitialized>
matches <uninitialized>
validstr <uninitialized>
Threads:
ID Location Source Code
0
pkg:/source/main.brs(15) screen.show()
2* ...ponents/libs/NWM_Omniture.brs(136) ??
*selected unattached(not debuggable)
Thanks again.