• 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
FLUTTER V1

API Reference

Reference guide for classes and methods provided by Tealium for Flutter.

Class: Tealium

The following summarizes the commonly used methods of the Flutter Tealium class.

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 persistent data
getPersistentDataForInstance() Gets persistent data, for a specific Tealium instance
getVolatileData() Gets volatile data, for a specific Tealium instance
getVolatileDataForInstance() Gets volatile data
initialize() Initializes the Tealium instance
initializeCustom() Initializes the Tealium instance with custom options
initializeWithConsentManager() Initializes the Tealium instance and enables Consent Management
removePersistentData() Removes persistent data
removePersistentDataForInstance() Removes persistent data, 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() Removes volatile data
removeVolatileDataForInstance() Removes volatile data, for a specific Tealium instance
setPersistentData() Sets persistent data
setPersistentDataForInstance() Sets persistent data, for a specific Tealium instance
setVolatileData() Sets volatile data
setVolatileDataForInstance() Sets volatile data, for a specific Tealium instance
trackEvent() Track non-view events
trackEventForInstance() Track non-view events, for a specific Tealium instance
trackView() Track screen views
trackViewForInstance() Track screen views, for a specific Tealium instance

addRemoteCommand()

Adds a remote command to the remote command manager.

Tealium.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", (payload) {

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

  analytics.logEvent(name: eventName, parameters: eventProperties);
});

addRemoteCommandForInstance()

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

Tealium.addRemoteCommandForInstance(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", "verify_email", "Verify User Email", (user) {

	print('Howdy, ${user.name}!');
	print('We sent the verification link to ${user.email}.');

	// Send data to email service to send email to user
	// ...
});

getPersistentData()

Gets persistent data.

Tealium.getPersistentData(data)
Parameter Type Description Example
key String Key name "key1"

getPersistentDataForInstance()

Gets persistent data, for a specific Tealium instance.

Tealium.getPersistentDataForInstance(instance, data)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
key String Key name "key1"

getVolatileData()

Gets volatile data.

Tealium.getVolatileData(data)
Parameter Type Description Example
key String Key name "key1"

getVolatileDataForInstance()

Gets volatile data, for a specific Tealium instance.

Tealium.getVolatileDataForInstance(instance, data)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
key String Key name "key1"

initialize()

Initializes the Tealium instance.

Tealium.initialize(account, profile, environment,
               iosDataSource, androidDataSource,
               instance, isLifecycleEnabled)
Parameter 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) data source key (Set to null if none) "abc123"
androidDataSource String (Optional) The Android data source key (Set to null if none) null
instance String (Optional) Tealium instance name (default: "main") "main"
isLifecycleEnabled Boolean (Optional) Enable lifecycle tracking events (default: true) ["true", "false"]

initializeCustom()

Initializes the Tealium instance with all options available.

Tealium.initializeCustom(account, profile, environment,
               iosDataSource, androidDataSource,
               instance, isLifecycleEnabled,
               overridePublishSettingsUrl,
               overrideTagManagementUrl,
               enableVdataCollectEndpointUrl,
               enableConsentManager)

The following additional parameters are included with this method call:

Parameter 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) data source key (Set to null if none) "abc123"
androidDataSource String (Optional) The Android data source key (Set to null if none) null
instance String (Optional) Tealium instance name (default: "main") "main"
isLifecycleEnabled Boolean (Optional) Enable lifecycle tracking events (default: true) ["true", "false"]
overridePublishSettingsUrl String (Optional) String representing the custom publish settings URL if overriding (Set to null if none)
overrideTagManagementUrl String (Optional) String representing the custom tag management URL if overriding (Set to null if none)
enableVdataCollectEndpointUrl String Toggle between data endpoints (true is the default in native Android and iOS libraries that send data to the Collect endpoint URL. false sends data to the older vdata endpoint (Set to null if none)
enableConsentManager Boolean Enable the Consent Manager (enable: true, disable: false) ["true", "false"]

initializeWithConsentManager()

Initializes the Tealium instance and enables Consent Management.

Tealium.initializeWithConsentManager(account, profile, environment,
               iosDataSource, androidDataSource,
               instance, isLifecycleEnabled)
Parameter 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) data source key (Set to null if none) "abc123"
androidDataSource String (Optional) The Android data source key (Set to null if none) null
instance String (Optional) Tealium instance name (default: "main") "main"
isLifecycleEnabled Boolean (Optional) Enable lifecycle tracking events (default: true) ["true", "false"]

removePersistentData()

Removes persistent data.

Tealium.removePersistentData(keys)
Parameter Type Description Example
keys List<String> List with String key names ["persistent_var", "persistent_var2"]

removePersistentDataForInstance()

Removes persistent data, for a specific Tealium instance.

Tealium.removePersistentDataForInstance(instance, keys)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
keys List<String> List with String key names ["persistent_var", "persistent_var2"]

removeRemoteCommand()

Removes a remote command from the remote command manager.

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

Example:

Tealium.removeRemoteCommand("firebase");

removeRemoteCommandForInstance()

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

Tealium.removeRemoteCommandForInstance(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"
Tealium.removeRemoteCommandForInstance("instance-2", "firebase");

removeVolatileData()

Removes volatile data.

Tealium.removeVolatileData(keys)
Parameter Type Description Example
keys List<String> List with String key names ["volatile_var", "volatile_var"]

removeVolatileDataForInstance()

Removes volatile data, for a specific Tealium instance.

Tealium.removeVolatileDataForInstance(instance, keys)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
keys List<String> List with String key names ["volatile_var", "volatile_var"]

setPersistentData()

Sets persistent data.

Tealium.setPersistentData(data)
Parameter Type Description Example
data Map<String, dynamic> Persistent data as key-value pairs {"key1": "value1"}

setPersistentDataForInstance()

Sets persistent data, for a specific Tealium instance.

Tealium.setPersistentDataForInstance(instance, data)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
data Map<String, dynamic> Persistent data as key-value pairs {"key1": "value1"}

setVolatileData()

Sets volatile data.

Tealium.setVolatileData(data)
Parameter Type Description Example
data Map<String, dynamic> Volatile data as key-value pairs {"key1": "value1"}

setVolatileDataForInstance()

Sets volatile data, for a specific Tealium instance.

Tealium.setVolatileDataForInstance(instance, data)
Parameter Type Description Example
instance String Specific Tealium instance name "instance123"
data Map<String, dynamic> Volatile data as key-value pairs {"key1": "value1"}

trackEvent()

Track non-view events.

Tealium.trackEvent(eventName, data)
Parameter Type Description Example
eventName String Name to identify the event "Event button click"
data Map<String, dynamic> (Optional) Event data as key-value pairs {"key1": "value1"}

trackEventForInstance()

Track non-view events, for a specific Tealium instance.

Tealium.trackEventForInstance(instance, eventName, data)
Parameter Type Description Example
instance String Tealium instance name "instance123"
eventName String Name to identify the event "Event button click"
data Map<String, dynamic> (Optional) Event data as key-value pairs {"key1": "value1"}

trackView()

Track screen views.

Tealium.trackView(viewName, data)
Parameter Type Description Example
viewName String Name to identify screen view "View screen"
data Map<String, dynamic> (Optional) Event data as key-value pairs {"key1": "value1"}

trackViewForInstance()

Track screen views, for a specific Tealium instance.

Tealium.trackViewForInstance(instance, viewName, data)
Parameter Type Description Example
instance String Tealium instance name "instance123"
viewName String Name to identify the view "Event button click"
data Map<String, dynamic> (Optional) Event data as key-value pairs {"key1": "value1"}
"Data Management "
Previous
Data Management
Next
Release Notes
"Release Notes"

 

Was this article helpful?

This page was last updated: May 10, 2021      

Thank you for your feedback!

Table of Contents

  • Class: Tealium
    • addRemoteCommand()
    • addRemoteCommandForInstance()
    • getPersistentData()
    • getPersistentDataForInstance()
    • getVolatileData()
    • getVolatileDataForInstance()
    • initialize()
    • initializeCustom()
    • initializeWithConsentManager()
    • removePersistentData()
    • removePersistentDataForInstance()
    • removeRemoteCommand()
    • removeRemoteCommandForInstance()
    • removeVolatileData()
    • removeVolatileDataForInstance()
    • setPersistentData()
    • setPersistentDataForInstance()
    • setVolatileData()
    • setVolatileDataForInstance()
    • trackEvent()
    • trackEventForInstance()
    • trackView()
    • trackViewForInstance()
  • 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