Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
lisakb140
Level 7

Can't Set Up Roku_Analytics:AnalyticsNode

I am trying to integrate the Roku Analytics Component, specifically Google Analytics,with my Roku Channel, per the documentation here (starting at "Implementation")

However, I keep getting an error when I try to create the roSGNode with type Roku_Analytics:AnalyticsNode.

I literally copied and pasted these lines from the docs, putting them in main.brs, in a function that initializes my main home page:

m.global.addField("RSG_analytics","node",false)
m.global.RSG_analytics = CreateObject("roSGNode","Roku_Analytics:AnalyticsNode")


I keep getting the error message:

Failed to create roSGNode with type Roku_Analytics:AnalyticsNode:


I know that usually when you create an roSGNode, the nodeType is something like a Poster or Label, so I was suspicious of the type being Roku_Analytics:AnalyticsNode, but this is what the docs say to do. 
Am I missing something??? Any help or advice at all would be much appreciated!!!
0 Kudos
3 Replies
renojim
Level 8

Re: Can't Set Up Roku_Analytics:AnalyticsNode

I downloaded the first sample given at the bottom of the page and it includes that code and it seems to work (at least it doesn't crash).  Are you including
sg_component_libs_required=Roku_Analytics

in your manifest?

-JT
0 Kudos
lisakb140
Level 7

Re: Can't Set Up Roku_Analytics:AnalyticsNode

Ah, good call! 

I copied and pasted sg_component_libs_required=Roku_Analyticsinto the "Other Libraries" field in my manifest, but got an error saying "BS lib provider not found." However, when I just put in "Roku_Analytics" into that field, I was able to successfully start the app and it looks like my node created---is this still correct? It seems odd that the docs would say to use "sg_component_libs_required.." but I only used the "Roku_Analytics" part...
0 Kudos
renojim
Level 8

Re: Can't Set Up Roku_Analytics:AnalyticsNode

I copied that line right from the manifest of the sample. Are you using Eclipse or something similar for deployment? If so, check the manifest that it creates.
0 Kudos