"congpt" wrote:
You try to use Segment.
I haven't tried it yet. Thanks! I created my channel using the NewVideoExample by belltown - https://github.com/belltown/Roku-NewVideoPlayer. I am trying to add Segment to my channel today. I have added the Analytics.brs to my source folder, but I don't quite understand what files to update or where to add the example code?User = createObject("roDeviceInfo").GetDeviceUniqueId()
Analytics = Analytics("UserIdentifier", "SegmentIOAPIKey", YourEventLoopPort)
and
MessagePort = GetGlobal().MessagePort
User = createObject("roDeviceInfo").GetDeviceUniqueId()
ApiKey = "ABCD1234"
Analytics = Analytics(User, ApiKey, MessagePort)
'My event loop
while true
msg = wait(0,MessagePort)
'You do stuff with events in your app here
Analytics = GetSession().Analytics
Analytics.HandleAnalyticsEvents(msg)
end while
also, in Segment, should I setup the profile as Android?
Thanks!