Roku SDK
Bitmovin Analytics enables you to get useful insights into the video usage in your apps. It offers a simple integration with the Bitmovin player and Roku's native video element. This guide requires an already set up Bitmovin player or Roku video element.
For more information on how to setup the Bitmovin player, go to the Player getting started guide.
Allowlist Domains
In order to use the Bitmovin Analytics on your Roku channel(s), you have to allow-list the domain(s) for which you want to use it. This is a security mechanism and protects your license from being used elsewhere. Allow-list your Roku app by adding your channel ID.
During local development the domain is defined as dev.roku
, which needs to be added to the allow-list. Once your Roku channel is published, make sure that you allow-list the domain (your channel id) which needs to be postfixed with .roku
. For example: suppose the channel id is YOUR_CHANNEL_ID
, then add YOUR_CHANNEL_ID.roku
to the allow-list in the Bitmovin dashboard.
Add the Bitmovin Analytics License Key to your channel's manifest

Alternatively, you can add the license key to the Bitmovin Analytics configuration later on. More on that follows down below.
Add the Bitmovin Analytics SDK to your project
Visit the Github repository of the Bitmovin Analytics Roku Collector and download the whole repository to your machine. Copy the following directories into the components
folder of your Roku app:
collectorCore
bitmovinPlayerCollector
Create the collector
Instantiate the Bitmovin Analytics collector.

Create a collector config
Create a collector configuration object to set video metadata and custom data fields.

It is also possible to pass your Bitmovin Analytics License Key to the collector config with the key
property. This is an optional step and not necessary if the license key is defined in the manifest file of your Roku app.
For all configuration options, please see the Analytics Configuration Overview.
Attach the collector to the Bitmovin Player
Initialize the collector with the config and attach it to the Bitmovin Player object m.bitmovinPlayer
to start listening to player events.

Notify the collector about source changes
Notify the collector about a source change of the Bitmovin player.

Create the collector
Instantiate the Bitmovin Analytics collector.

Create a collector config
Create a collector configuration object to set video metadata and custom data fields.

It is also possible to pass your Bitmovin Analytics License Key to the collector config with the key
property. This is an optional step and not necessary if the license key is defined in the manifest file of your Roku app.
For all configuration options, please see the Analytics Configuration Overview.
Attach the collector to the Roku Native Player
Initialize the collector with the config and attach it to the native player object m.nativePlayer
to start listening to player events.

Notify the collector about source changes
Notify the collector about a source change of the native player.

Deinitialize the collector
Clean up the analytics collector when it is no longer needed before removing the native video element.

After the setup is done there is nothing more to do. Events are recorded automatically and you can head over to the analytics dashboard to see statistics.
You can find many more fully functional code examples in our Github Repository.