- Login to Datazoom here: https://app.datazoom.io
- Add a Collector as indicated here: How to add a Collector
- Copy the
config keythat was created at the end of the process
Click the icon indicated below to copy the Configuration Key
You will see this message:
4. Replace the
<configuration id from Datazoom> with the Key you copied above.
5. Replace the
<url given by Datazoom> with
Adding dependencies to your project
Roku Plugin for Eclipse IDE
For Roku plugin installation and usage in Eclipse IDE
Clone the repository
Extract the components folder from cloned repository(Latest version)
Copy the components folder in your channel project.
Note: We assume that:
- The developer had already created a Roku project(in Eclipse IDE).
- The project does not have components folder. If there is already a components folder, then copy the content of the components directory(DzLib folder) into your project's components directory
eg: /<your project>/components/DzLib
- This project contains the base and native-collector library(inside DzLib folder).
Configuring collector library in channel
Copy the following in MainScene.brs(in components folder) or in the brs file you intend to configure the collector library.
In Sub/function init(), add the following
Also add the following function for initializing SDK
DzCollector() will call the above function when initialized.
Change the configURL, configId and <Player ID> as per the requirement.
Copy the following inside <children> in MainScene.xml or in the xml file you intend to configure the collector library.
At this point Datazoom SDK is initialized and we can send custom events and metadata, user data, device data and geo location data.
We can set Custom Metadata to Datazoom SDK using following methods:
Change "CustomMetaKey" and "CustomMetaValue" to any text or variable you want to send to collector service
We can also delete Custom Metadata by sending empty string
Also we can send Custom Event to Datazoom SDK using following methods:
We can also add some custom metadata to generated custom event
Now, after we create player instance we can add player to Datazoom SDK
Add the following inside <children> in MainScene.xml or in the xml file you intend to configure the collector library.
and your xml file should look like this:
Change <Player ID> as per the requirement.
Now add the following function for initializing player to Datazoom SDK:
DzPlayer() will call the above function when initialized.
At this point Datazoom SDK is fully initialized with player. Selected data points will be collected from player and sent to collector service.
Instructions to create a compiled zip file
- Your-Project(Right click) > Export > BrightScript > BrightScript Deployment >[Change File name/path, if needed (.zip)] > Finish
- Open browser and go to Roku's local network IP address.(eg: 192.168.0.9). Provide username and password of developer mode.
- Click upload and select the newly created zip file. Click install.
- The channel will automatically start playing. This channel can also be played by-> go to Roku menu, select the Roku developer channel and play.
- To view the data points generated by Roku, go to Linux terminal and type
telnet <Roku's Local IP> 8085
eg: - telnet 192.168.0.9 8085