• Platforms
  • Partners
  • Forums
  • 日本語
  • TLC Tealium Learning Center Tealium Learning
    Community
  • Discussions & Ideas Dicussions & Ideas
  • Product Guides Product Guides
  • Knowledge Base Knowledge Base
  • Developer Docs Developer Docs
  • Education Education
  • TLC Blog TLC Blog
  • Support Desk Support Desk
  • CDH Customer Data Hub Customer Data Hub
  • Mobile
  • Getting Started
    • Overview
    • Quick Start Guide
    • Mobile Concepts
    • Client-Side
    • Server-Side
    • Tracking Webviews
    • Data Layer
    • Consent Management
    • Event Batching
    • User Location and Geofencing
    • Media Tracking
    • Deep Links
    • Timed Events
    • Trace
    • Hosted Data Layer
    • Adobe Visitor Service Module
    • Feature Comparison
    • Troubleshooting
  • Remote Commands
    • Overview
    • How It Works
    • Integrations
      • Adjust
      • AppsFlyer
      • Branch
      • Braze
      • Contentsquare
      • Facebook
      • Firebase
      • Kochava
      • Usabilla
  • Android (Java)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Module
      • Optimizely X Tracking Module
    • Android TV
    • Android Wear
    • API Reference
      • ConsentManager
      • DataSources
      • Lifecycle
      • Tealium
      • Tealium.Config
      • TealiumLocation
    • Release Notes
  • Android (Kotlin)
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • Identity Resolution
    • Module List
      • Ad Identifier Module
      • AutoTracking Module
      • AdobeVisitorService Module
      • Collect Module
      • Collectors Module
      • Crash Reporter Module
      • In-App Purchase Module
      • Install Referrer Module
      • Lifecycle Tracking Module
      • Location Manager Module
      • Media Module
      • RemoteCommands Module
      • Tag Management Dispatcher Module
      • Visitor Service Module
    • Android TV
    • API Reference
      • ConsentCategory
      • ConsentManager
      • CurrentVisit
      • DataLayer
      • Lifecycle
      • LocationManager
      • Media
      • Tealium
      • TealiumConfig
      • VisitorProfile
      • VisitorService
    • Release Notes
  • Cordova 1.x
    • Overview
    • Install
    • Track
    • Data Management
    • Module List
      • Ad Identifier Module
      • Crash Reporter Module
      • Install Referrer Module
    • API Reference
    • Release Notes
  • Cordova 2.x
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Flutter 1.x
    • Overview
    • Install
    • Track
    • Consent Management
    • Data Management
    • API Reference
    • Release Notes
  • Flutter 2.x
    • Overview
    • Install
    • Track
    • Consent Management
    • Data Management
    • API Reference
      • Tealium
      • TealiumConfig
      • VisitorProfile
    • Release Notes
  • iOS (Objective-C)
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • Consent Management
    • Tag Management
    • Module List
      • Lifecycle Tracking Module
    • tvOS
    • watchOS
    • API Reference
    • Release Notes
  • iOS (Swift) 1.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Data Management
    • App Extensions
    • Identity Resolution
    • Consent Management
    • Modules
    • Module List
      • AppData Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DataSource Module
      • DefaultStorage Module
      • Delegate Module
      • DeviceData Module
      • DispatchQueue Module
      • FileStorage Module
      • Lifecycle Module
      • Location Module
      • Logger Module
      • PersistentData Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
      • VolatileData Module
    • Feature Comparison
    • Working with Objective-C
    • API Reference
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManagerDelegate
      • TealiumConsentManager
      • TealiumInstanceManager
      • TealiumPersistentData
      • TealiumVolatileData
      • Tealium
    • Release Notes
  • iOS (Swift) 2.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • App Extensions
    • Identity Resolution
    • Modules
    • Module List
      • AppData Module
      • AdobeVisitorService Module
      • Attribution Module
      • AutoTracking Module
      • Collect Module
      • Connectivity Module
      • CrashReporter Module
      • DeviceData Module
      • In-App Purchase Module
      • Lifecycle Module
      • Location Module
      • Media Module
      • RemoteCommands Module
      • TagManagement Module
      • VisitorService Module
    • Working with Objective-C
    • API Reference
      • LocationModule
      • MediaSession
      • Tealium
      • TealiumConfig
      • TealiumConsentCategories
      • TealiumConsentManager
      • TealiumDataLayer
      • TealiumInstanceManager
    • Release Notes
  • NativeScript
    • Overview
    • Install
    • Track
    • API Reference
      • Tealium
      • TealiumConfig
    • Release Notes
  • React Native 1.x
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • React Native 2.x
    • Overview
    • Install
    • Track
    • Location Module
    • API Reference
    • Release Notes
  • Unity 1.x
    • Overview
    • Install
    • Track
    • API Reference
  • Unity 2.x
    • Overview
    • Install
    • Track
    • API Reference
  • Xamarin 1.x
    • Overview
    • Install
    • Track
    • Data Management
    • Consent Management
    • API Reference
    • Release Notes
  • Xamarin 2.x
    • Overview
    • Install
    • Track
    • Data Layer
    • Consent Management
    • API Reference
    • Release Notes
  • Web
  • Getting Started
    • Overview
    • Quick Start Guide
    • Web Concepts
    • Data Layer
      • An Introduction to the Data Layer
      • How the Data Layer Works for Websites
      • Data Layer Best Practices
      • Definitions
        • Retail
        • Publisher
        • Hotel
        • Travel
        • Basic Video Tracking
  • Adobe Launch
    • Overview
    • Install
    • Data Layer
  • AMP
    • Overview
    • Install
    • Track
    • Data Layer
  • Angular
    • Overview
    • Install
    • Track
    • API Reference
  • Google Tag Manager
    • Overview
    • Install
    • Data Layer
  • JavaScript (Web)
    • Overview
    • Install
    • Track
    • Data Layer
    • Universal Data Object (utag_data)
    • Universal Tag (utag.js)
    • Data Layer Object (b)
    • Single-Page Applications
    • Settings
    • Debugging
    • API Reference
      • Cookie Functions
      • GDPR Functions
      • Tracking Functions
      • Utility Functions
    • Release Notes
  • Server
  • C#
    • Overview
    • Install
    • Track
    • Data Layer
    • API Reference
    • Release Notes
  • HTTP API
    • Overview
    • Endpoint
    • Data Layer
  • Java
    • Overview
    • Install
    • Track
    • API Reference
    • Release Notes
  • Node
    • Overview
    • Install
    • Track
    • API Reference
  • Python
    • Overview
    • Install
    • Track
    • API Reference
  • Roku
    • Overview
    • Install
    • Track
    • API Reference
  • Ruby
    • Overview
    • Install
    • Track
    • API Reference
REACT NATIVE V1

API Reference

Reference guide for classes and methods provided by Tealium for React Native.

Class: Tealium

The following summarizes the commonly used methods of the Tealium class for React Native library.

Method Description
addRemoteCommand() Adds a remote command to the remote command manager
addRemoteCommandForInstance() Adds a remote command to the remote command manager, for a specific Tealium instance
getPersistentData() Gets the value for a specific key
getPersistentDataForInstanceName() Get a persistent data value, for a specific Tealium instance and key
getUserConsentCategories() Gets the consent categories of a user
getUserConsentCatgoriesForInstanceName() Gets the consent categories of a user, for a specific Tealium instance
getUserConsentStatus() Gets the consent status of a user
getUserConsentStatusForInstanceName() Gets the consent status of a user, for a specific Tealium instance
getVisitorID() Gets the visitorID of a user
getVisitorIDForInstanceName() Gets the visitorID of a user, for a specific Tealium instance
getVolatileData() Gets the value for the key passed in
getVolatileDataForInstanceName() Get a volatile data value, for a specific Tealium instance and key
initialize() Initialize Tealium before calling any other method
initializeCustom() Initialize Tealium with all options before calling any other method
initializeWithConsentManager() Initialize Tealium with Consent Management before calling any other method
isConsentLoggingEnabled() Checks if consent logging is enabled for a user
isConsentLoggingEnabledForInstanceName() Checks if consent logging is enabled, for a specific Tealium instance
removePersistentData() Remove persistent data that has been previously set using setPersistentData()
removePersistentDataForInstanceName() Remove persistent data that has been previously set using setPersistentData() for a specific Tealium instance
removeRemoteCommand() Removes a remote command from the remote command manager
removeRemoteCommandForInstanceName() Removes a remote command from the remote command manager, for a specific Tealium instance
removeVolatileData() Remove volatile data that has been previously set using setVolatileData()
removeVolatileDataForInstanceName() Remove volatile data that has been previously set using setVolatileData(), for a specific Tealium instance
resetUserConsentPreferences() Resets the user consent status and categories of a user
resetUserConsentPreferencesForInstanceName() Resets the user consent status and categories of a user, for a specific Tealium instance
setConsentLoggingEnabled() Sets user’s consent logging
setConsentLoggingEnabledForInstanceName() Sets user’s consent logging, for a specific Tealium instance
setPersistentData() Set persistent data to be sent with each subsequent event or view, even between app restarts
setPersistentDataForInstanceName() Set persistent data to be sent with each subsequent event or view, even between app restarts, for a specific Tealium instance
setUserConsentCategories() Sets the consent categories of a user
setUserConsentCategoriesForInstanceName() Sets the consent categories of a user, for a specific Tealium instance
setUserConsentStatus() Sets the consent status of a user
setUserConsentStatusForInstanceName() Sets the consent status of a user, for a specific Tealium instance
setVolatileData() Set volatile data to be sent with each subsequent event or view until the app is terminated
setVolatileDataForInstanceName() Set volatile data to be included with each subsequent tracking call until the app is terminated, for a specific Tealium instance
trackEvent() Track an event with an event name and event data
trackEventForInstanceName() Track an event when you have multiple instances of Tealium in your app, for a specific Tealium instance
trackView() Track a view with a screen name and view data
trackViewForInstanceName() Track a view when you have multiple instances of Tealium in your app, for a specific Tealium instance

addRemoteCommand()

Adds a remote command to the remote command manager.

addRemoteCommand(commandID, description, callback);
Parameters Type Description Example
commandID String Name of the command ID from the tag configuration "test_command"
description String Description of the remote command "Firebase remote command"
callback Function A callback function to execute once the response is received from the remote command. The callback returns a payload of key-value pairs from the tag mappings. (see example)

Example:

Tealium.addRemoteCommand("firebase", "Firebase remote command", function(payload) {

  var eventName = payload["firebase_event_name"];
  var eventProperties = payload["firebase_event_properties"];

  analytics.logEvent(eventName, eventProperties);
});

addRemoteCommandForInstanceName()

Adds a remote command to the remote command manager, for a specific Tealium instance.

addRemoteCommandForInstanceName(instanceName, commandID, description, callback);
Parameters Type Description Example
instanceName String Name of the Tealium instance "instance-2"
commandID String Name of the command ID from the tag configuration "test_command"
description String Description of the remote command "Firebase remote command"
callback Function A callback function to execute once the response is received from the remote command. The callback returns a payload of key-value pairs from the tag mappings. (see example)

Example:

Tealium.addRemoteCommand("instance-2", "survey", "Display feedback survey", function(payload) {

	var title = payload["survey_title"];
	var question = payload["survey_question"];

	Alert.alert(title, question, [{text: 'Yes', onPress: () => surveyHandler()},
								  {text: 'No', onPress: () => surveyHandler()}]);

});

getPersistentData()

Gets the value for a specific key.

Tealium.getPersistentData(key, value);
Parameters Type Description Example
key String Key name of value "foo"
value Object JSON object of key-value pairs function(value) {console.log("get persistent: " + value);}

getPersistentDataForInstanceName()

Get a persistent data value, for a specific Tealium instance and key. For use if you have multiple instances of Tealium in your app.

Tealium.getPersistentDataForInstanceName(instanceName, key, value);
Parameters Type Description Example
name String Instance name "instance-2"
key String Key name of value "foo"
data Object JSON object of key-value pairs function(value) {console.log("get volatile: " + value);}

getUserConsentCategories()

Gets the consent categories of a user. Pass in a callback to use the userConsentCategories.

Tealium.getUserConsentCategories(userConsentCategories);
Parameters Type Description Example
userConsentCategories Callback Callback function to use the user consent categories function (consentCategories) {console.log("categories 'main': " + consentCategories);}

getUserConsentCatgoriesForInstanceName()

Gets the consent categories of a user, for a specific Tealium instance. Pass in a callback to use the userConsentCategories. For use if you have multiple instances of Tealium in your app.

Tealium.getUserConsentCategoriesForInstanceName(name, userConsentCategories);
Parameters Type Description Example
name String Instance name "instance-2"
userConsentCategories Callback Callback function to use the user consent categories function (consentCategories) {console.log("categories 'main': " + consentCategories);}

getUserConsentStatus()

Gets the consent status of a user. Pass in a callback to use the userConsentStatus.

Tealium.getUserConsentStatus(userConsentStatus);
Parameters Type Description Example
userConsentStatus Callback Callback function to use the user consent status function(userConsentStatus) {console.log("consent status 'instance-2': " + userConsentStatus);}

getUserConsentStatusForInstanceName()

Gets the consent status of a user, for a specific Tealium instance. Pass in a callback to use the userConsentStatus. For use if you have multiple instances of Tealium in your app.

Tealium.getUserConsentStatusForInstanceName(name, userConsentStatus);
Parameters Type Description Example
name String Instance name "instance-2"
userConsentStatus Callback Callback function to use the user consent status function(userConsentStatus) {console.log("consent status 'instance-2': " + userConsentStatus);}

getVisitorID()

Gets the visitorID of a user. Pass in a callback to use the visitorID.

Tealium.getVisitorID(visitorID);
Parameters Type Description Example
visitorID Callback Callback function to use the visitor ID function (visitorID) {console.log("visitorID: " + visitorID);}

getVisitorIDForInstanceName()

Gets the visitorID of a user, for a specific Tealium instance. Pass in a callback to use the visitorID. For use if you have multiple instances of Tealium in your app.

Tealium.getVisitorIDForInstanceName(name, visitorID);
Parameters Type Description Example
name String Instance name "instance-2"
visitorID Callback Callback function to use the visitor ID function (visitorID) {console.log("visitorID: " + visitorID);}

getVolatileData()

Gets the value for the key passed in.

Tealium.getVolatileData(key, value);
Parameters Type Description Example
key String Key name of value "foo"
value Object JSON object of key-value pairs function(value) {console.log("get volatile: " + value);}

getVolatileDataForInstanceName()

Get a volatile data value, for a specific Tealium instance and key. For use if you have multiple instances of Tealium in your app.

Tealium.getVolatileDataForInstanceName(instanceName, key, value);
Parameters Type Description Example
name String Instance name "instance-2"
key String Key name of value "foo"
data Object JSON object of key-value pairs function(value) {console.log("get volatile: " + value);}

initialize()

Initialize Tealium before calling any other method.

initialize(account,
    profile,
    environment,
    iosDatasource,
    androidDatasource,
    instance,
    isLifecycleEnabled);
Parameters Type Description Example
account String Tealium account name "companyXYZ"
profile String Tealium profile name "main"
environment String Tealium environment name ["dev", "qa", "prod"]
iosDatasource String (Optional) Tealium iOS data source key "abc123"
androidDatasource String (Optional) Tealium Android data source key "xyz123"
instance String Tealium instance name (default: "MAIN") "MAIN"
isLifecycleEnabled Boolean (Optional) To enable lifecycle tracking (default: true) [true, false]

initializeCustom()

Initialize Tealium with all options before calling any other method.

initializeCustom(account,
        profile,
        environment,
        iosDatasource,
        androidDatasource,
        instance,
        isLifecycleEnabled,
        overridePublishSettingsURL,
        overrideTagManagementURL,
        collectURL,
        enableConsentManager,
        overrideCollectDispatchURL
    );
Parameters Type Description Example
account String Tealium account name "companyXYZ"
profile String Tealium profile name "main"
environment String Tealium environment name ["dev", "qa", "prod"]
iosDatasource String (Optional) Tealium iOS data source key "abc123"
androidDatasource String (Optional) Tealium Android data source key "xyz123"
instance String Tealium instance name (default: "MAIN") "MAIN"
isLifecycleEnabled Boolean (Optional) To enable lifecycle tracking (default: true) [true, false]
overridePublishSettingsURL String The publish settings URL if overriding (default: null) null
overrideTagManagementURL String The tag management URL if overriding (default: null) null
collectURL Boolean To send data to the Collect endpoint if enabled (default: true) [true, false]
enableConsentManager Boolean To enable Consent Management [true, false]
overrideCollectDispatchURL String The collect URL if overriding (default: null) null

initializeWithConsentManager()

Initialize Tealium with Consent Management before calling any other method.

initializeWithConsentManager(account,
  profile,
  environment,
  iosDatasource,
  androidDatasource,
  instance,
  isLifecycleEnabled);
Parameters Type Description Example
account String Tealium account name "companyXYZ"
profile String Tealium profile name "main"
environment String Tealium environment name ["dev", "qa", "prod"]
iosDatasource String (Optional) Tealium iOS data source key "abc123"
androidDatasource String (Optional) Tealium Android data source key "xyz123"
instancee String Tealium instance name (default: "MAIN") "MAIN"
isLifecycleEnabled Boolean (Optional) To enable lifecycle tracking (default: true) [true, false]

isConsentLoggingEnabled()

Checks if consent logging is enabled for a user. Pass in a callback to use the value of consent logging.

isConsentLoggingEnabled(enabled);
Parameters Type Description Example
callback Callback Checks if consent logging is enabled for a user ‘function (enabled) {console.log(“consent logging enabled ‘main’: “ + enabled);}’

isConsentLoggingEnabledForInstanceName()

Checks if user’s consent logging is enabled, for a specific Tealium instance. Pass in a callback to use the value of consent logging. For use if you have multiple instances of Tealium in your app.

Tealium.isConsentLoggingEnabledForInstanceName(name, enabled);
Parameters Type Description Example
name String Instance name "instance-2"
callback Callback Checks if consent logging is enabled for a user ‘function (enabled) {console.log(“consent logging enabled ‘main’: “ + enabled);}’

removePersistentData()

Remove persistent data that has been previously set using Tealium.setPersistentData().

Tealium.removePersistentData(keys);
Parameters Type Description Example
keys [String] Array of key names ["foo", "bar"]

removePersistentDataForInstanceName()

Remove persistent data that has been previously set using Tealium.setPersistentData(), for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.removePersistentDataForInstanceName(instanceName, keys);
Parameters Type Description Example
name String Instance name "instance-2"
keys [String] Array of key names ["foo", "bar"]

removeRemoteCommand()

Removes a remote command from the remote command manager.

removeRemoteCommand(commandID);
Parameters Type Description Example
commandID String Name of the command ID to remove "test_command"

Example:

Tealium.removeRemoteCommand("firebase");

removeRemoteCommandForInstanceName()

Removes a remote command from the remote command manager, for a specific Tealium instance.

removeRemoteCommandForInstanceName(instanceName, commandID);
Parameters Type Description Example
instanceName String Name of the Tealium instance "instance-2"
commandID String Name of the command ID to remove "test_command"

Example:

Tealium.removeRemoteCommand("instance-2", "firebase");

removeVolatileData()

Remove volatile data that has been previously set using Tealium.setVolatileData().

Tealium.removeVolatileData(keys);
Parameters Type Description Example
keys [String] Array of key names ["foo", "bar"]

removeVolatileDataForInstanceName()

Remove volatile data for provided instance names. For use if you have multiple instances of Tealium in your app.

Tealium.removeVolatileDataForInstanceName(name, keys);
Parameters Type Description Example
name String Instance name "instance-2"
keys [String] Array of key names ["foo", "bar"]

resetUserConsentPreferences()

Resets the user consent status and categories of a user.

Tealium.resetUserConsentPreferences();

resetUserConsentPreferencesForInstanceName()

Resets the user consent status and categories of a user, for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.resetUserConsentPreferencesForInstanceName(name);
Parameters Type Description Example
name String Instance name "instance-2"

setConsentLoggingEnabled()

Sets consent logging for a user.

Tealium.setConsentLoggingEnabled(enabled);
Parameters Type Description Example
enabled boolean Enables consent logging for a user ["true", "false"]

setConsentLoggingEnabledForInstanceName()

Sets user’s consent logging, for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.setConsentLoggingEnabledForInstanceName(name, enabled);
Parameters Type Description Example
name String Instance name "instance-2"
enabled boolean Enables consent logging for a user ["true", "false"]

setPersistentData()

Set persistent data to be sent with each subsequent event or view, even between app restarts.

Tealium.setPersistentData(data);
Parameters Type Description Example
data Object JSON object of key-value pairs, where keys are strings and the values are either a string or array of strings {"persistent_key2" : "persistent_val2"}

setPersistentDataForInstanceName()

Set persistent data to be sent with each subsequent event or view, even between app restarts, for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.setPersistentDataForInstanceName(instanceName, data);
Parameters Type Description Example
name String Instance name "instance-2"
data Object JSON object of key-value pairs, where keys are strings and the values are either a string or array of strings {"persistent_key2" : "persistent_val2"}

setUserConsentCategories()

Sets the consent categories of a user. Pass in an array of Strings to set the categories.

Tealium.setUserConsentCategories(userConsentCategories);
Parameters Type Description Example
userConsentCategories [String] Array of user consent categories ["email", "personalization"]

setUserConsentCategoriesForInstanceName()

Sets the consent ;categories of a user, for a specific Tealium instance. Pass in an array of Strings to set the categories. For use if you have multiple instances of Tealium in your app.

Tealium.setUserConsentCategoriesForInstanceName(name, userConsentCategories);
Parameters Type Description Example
name String Instance name "instance-2"
userConsentCategories [String] Array of user consent categories ["analytics", "big_data"]

setUserConsentStatus()

Sets the consent status of a user.

Tealium.setUserConsentStatus(userConsentStatus);
Parameters Type Description Example
userConsentStatus int User consent status [0, 1, 2, 3]
Consent Status Value Description
0 Unknown
1 Consented
2 Not Consented
3 Disabled (Objective-C only)

setUserConsentStatusForInstanceName()

Sets the consent status of a user, for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.setUserConsentStatusForInstanceName(name, userConsentStatus);
Parameters Type Description Example
name String Instance name "instance-2"
userConsentStatus int User consent status [0, 1, 2, 3]
Consent Status Value Description
0 Unknown
1 Consented
2 Not Consented
3 Disabled (Objective-C only)

setVolatileData()

Set volatile data to be sent with each subsequent event or view until the app is terminated, where data is a JSON object of key-value pairs where keys are strings and the values are either a string or array of strings.

Tealium.setVolatileData(data);
Parameters Type Description Example
data Object JSON object of key-value pairs, where keys are strings and the values are either a string or array of strings {"volatile_var": "volatile_val", "volatile_var2": "volatile_val2"}

setVolatileDataForInstanceName()

Set volatile data to be included with each subsequent tracking call until the app is terminated, for a specific Tealium instance. For use if you have multiple instances of Tealium in your app.

Tealium.setVolatileDataForInstanceName(name, data);
Parameters Type Description Example
name String Key name of value “instance-2”
data Object JSON object of key-value pairs {"foo": "bar"}

trackEvent()

Track an event with an event name and event data.

trackEvent(stringTitle, data);
Parameters Type Description Example
stringTitle String Name of event (becomes the event_name attribute in Tealium Customer Data Hub) "test_event"
data Object JSON object of key-value pairs {"title": "test_event", "event_title": "test_event", "testkey": "testval", "anotherkey": "anotherval"}

trackEventForInstanceName()

Track an event when you have multiple instances of Tealium in your app, for a specific Tealium instance.

trackEvent(name, stringTitle, data);
Parameters Type Description Example
name String Name of the Tealium instance "instance-2"
stringTitle String Name of event (becomes the event_name attribute in Customer Data Hub) "test_event_2"
data Object JSON object of key-value pairs

trackView()

Track a view with a screen name and view data.

trackView(screenName, data);
Parameters Type Description Example
stringTitle String Name of event (becomes the screen_title attribute in Customer Data Hub) "test_view"
data Object JSON object of key-value pairs {"title": "test_view", "event_title": "test_view", "testkey": "testval", "anotherkey": "anotherval"}

trackViewForInstanceName()

Track a view when you have multiple instances of Tealium in your app, for a specific Tealium instance.

Tealium.trackViewForInstanceName(instanceName, screenName, data);
Parameters Type Description Example
name String Name of the Tealium instance "instance-2"
stringTitle String Name of event (becomes the screen_title attribute in Customer Data Hub) "instance_2_view"
data Object (Optional) JSON object of key-value pairs
"Track "
Previous
Track
Next
Release Notes
"Release Notes"

 

Was this article helpful?

This page was last updated: January 15, 2021      

Thank you for your feedback!

Table of Contents

  • Class: Tealium
    • addRemoteCommand()
    • addRemoteCommandForInstanceName()
    • getPersistentData()
    • getPersistentDataForInstanceName()
    • getUserConsentCategories()
    • getUserConsentCatgoriesForInstanceName()
    • getUserConsentStatus()
    • getUserConsentStatusForInstanceName()
    • getVisitorID()
    • getVisitorIDForInstanceName()
    • getVolatileData()
    • getVolatileDataForInstanceName()
    • initialize()
    • initializeCustom()
    • initializeWithConsentManager()
    • isConsentLoggingEnabled()
    • isConsentLoggingEnabledForInstanceName()
    • removePersistentData()
    • removePersistentDataForInstanceName()
    • removeRemoteCommand()
    • removeRemoteCommandForInstanceName()
    • removeVolatileData()
    • removeVolatileDataForInstanceName()
    • resetUserConsentPreferences()
    • resetUserConsentPreferencesForInstanceName()
    • setConsentLoggingEnabled()
    • setConsentLoggingEnabledForInstanceName()
    • setPersistentData()
    • setPersistentDataForInstanceName()
    • setUserConsentCategories()
    • setUserConsentCategoriesForInstanceName()
    • setUserConsentStatus()
    • setUserConsentStatusForInstanceName()
    • setVolatileData()
    • setVolatileDataForInstanceName()
    • trackEvent()
    • trackEventForInstanceName()
    • trackView()
    • trackViewForInstanceName()
  • Platforms
  • Partners
  • Forums
  • Mobile
  • Getting Started
  • Remote Commands
  • Android (Java)
  • Android (Kotlin)
  • Cordova 1.x
  • Cordova 2.x
  • Flutter 1.x
  • Flutter 2.x
  • iOS (Objective-C)
  • iOS (Swift) 1.x
  • iOS (Swift) 2.x
  • NativeScript
  • React Native 1.x
  • React Native 2.x
  • Unity 1.x
  • Unity 2.x
  • Xamarin 1.x
  • Xamarin 2.x
  • Web
  • Getting Started
  • Adobe Launch
  • AMP
  • Angular
  • Google Tag Manager
  • JavaScript (Web)
  • Server
  • C#
  • HTTP API
  • Java
  • Node
  • Python
  • Roku
  • Ruby