Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lisakb140
Visitor

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 3
renojim
Community Streaming Expert

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
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
lisakb140
Visitor

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
Community Streaming Expert

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.
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos