Your Digital Media Has Never Looked So Good

 
cmmclaug
Topic Author
Posts: 1
Joined: Mon Sep 24, 2018 11:13 am

Omniture integration with RSG_Analytics failing

Mon Sep 24, 2018 11:35 am

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 ... +Component

Following 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[u] pkg:/source/main.brs(15)                screen.show()
 2*   ...ponents/libs/NWM_Omniture.brs(136)   ??
  *selected   [u]unattached(not debuggable)

Thanks again.
 
lukechinworth
Posts: 7
Joined: Mon Dec 17, 2018 3:39 pm

Re: Omniture integration with RSG_Analytics failing

Fri Jan 25, 2019 9:44 am

I am getting the same error on the same line.
 
lukechinworth
Posts: 7
Joined: Mon Dec 17, 2018 3:39 pm

Re: Omniture integration with RSG_Analytics failing

Fri Jan 25, 2019 1:18 pm

I believe this is a bug. I have seen validstr referenced in other brs util code, but it appears to be undefined in the roku_analytics lib, so I'm guessing that this use of validstr was accidentally left in. Analytics requests that do not return set-cookie headers are fine, but any that do fail on this line.
 
User avatar
RokuNB
Posts: 455
Joined: Fri Mar 31, 2017 2:22 pm

Re: Omniture integration with RSG_Analytics failing

Thu Jan 31, 2019 1:48 pm

seems like a bug, yes. i'll escalate it, thanks for bringing it up
 
User avatar
RokuNB
Posts: 455
Joined: Fri Mar 31, 2017 2:22 pm

Re: Omniture integration with RSG_Analytics failing

Thu Feb 14, 2019 3:34 pm

This will be fixed in v1.2 of Roku Analytics Component, soon to be out
 
taschmidt
Posts: 1
Joined: Fri Feb 22, 2019 11:19 am

Re: Omniture integration with RSG_Analytics failing

Fri Feb 22, 2019 11:21 am

@cmmclaug can I ask how the heck you managed to get at the source for the analytics component? We're having troubles and Roku's support leaves a lot to be desired!

Who is online

Users browsing this forum: amygo and 3 guests