API Reference
Reference guide for classes and methods provided by Tealium for Roku.
The following lists the available functions in the Tealium for Roku library. Apps for Roku are written in BrightScript, a powerful scripting language. Learn more about BrightScript.
Class: TealiumBuilder
The following summarizes the commonly used methods of the TealiumBuilder
class for the Roku library.
Method | Description |
---|---|
SetDatasource() |
Sets the data source key of the Tealium object. |
SetEnvironment() |
Sets the environment of the Tealium object. |
SetLogLevel() |
Sets the log level of the Tealium object. |
TealiumBuilder() |
A builder constructor function to help initialize the Tealium object. |
SetDatasource()
Sets the data source key of the Tealium
object.
SetDatasource(datasource)
Parameters | Type | Description | Example |
---|---|---|---|
datasource |
String | Data source key | "def456" |
SetEnvironment()
Sets the environment of the Tealium
object.
SetEnvironment(environment)
Parameters | Type | Description | Example |
---|---|---|---|
environment |
String | Tealium environment name | ["dev" , "qa" , "prod" ] |
SetLogLevel()
Sets the log level of the Tealium
object.
SetLogLevel(logLevel)
Parameters | Type | Description | Example |
---|---|---|---|
logLevel |
Integer | Tealium log level | 1 |
TealiumBuilder()
A builder function to help initialize the Tealium
object. Set optional parameters using the utility functions. Create the Tealium object by calling Build()
.
TealiumBuilder(account, profile, logLevel)
Parameters | Type | Description | Example |
---|---|---|---|
account |
String | Tealium account name | "account123" |
profile |
String | Tealium profile name (default: "main" ) |
"main" |
logLevel |
String | Log level | 1 |
Class: TealiumCore
The following summarizes the commonly used methods of the TealiumCore
class for Roku library.
Method | Description |
---|---|
ToStr() |
Returns a readable String containing the configuration details of the current Tealium instance. |
TrackEvent() |
Tracks an event with associated data and, optionally, triggers a callback function. |
ResetSessionId() |
Resets and returns a new session ID. |
ToStr()
Returns a human-readable String containing the configuration details of the current Tealium instance.
ToStr()
Returns | Return Type | Example |
---|---|---|
Human-readable String containing the configuration details of the current Tealium instance. | String | "Tealium instance for account: ACCOUNT profile: PROFILE environment: ENV" |
TrackEvent()
Tracks an event with associated data and, optionally, triggers a callback function.
trackEvent(eventType, title, data)
Parameters | Type | Description |
---|---|---|
eventType |
String | Tealium event type (activity , conversion , derived , interaction , or view ). |
eventName |
String | Name of event (becomes the event_name attribute in Tealium Customer Data Hub). |
data |
Object | Contextual event data, an roAssociativeArray object containing keys-value pairs . |
ResetSessionId()
Resets and returns a new session ID. The session ID identifies the current user session, similar to a website session, but it does not expire. A new session ID is created each time createTealium()
is called.
resetSessionId() as Integer
Returns | Return Type |
---|---|
A new session ID | Integer |
This page was last updated: May 17, 2023