Remote Command: FullStory
Tealium remote command integration for FullStory on Android and Swift/iOS.
Requirements
- One of the following mobile libraries:
- Tealium for Android-Kotlin (1.0.0+)
- Tealium for Android-Java (5.9.0+ for FullStory 1.0.0+ or <5.9.0 for previous versions)
- Tealium for iOS-Swift
- One of the following remote command integrations:
- FullStory Remote Command JSON File (Requires Android-Kotlin 1.0.0+ or iOS-Swift 2.1.0+)
- FullStory Remote Command tag in Tealium iQ Tag Management
How it works
The FullStory integration uses three components:
- The FullStory native SDK.
- The remote commands module that wraps the FullStory methods.
- Either the JSON configuration file or Remote Command tag that translates event tracking into native FullStory calls.
Adding the FullStory remote command module to your app automatically installs and builds the required FullStory libraries. If you are using a dependency manager installation, you do not need to install the FullStory SDK separately.
If you are using CocoaPods or Carthage as your dependency manager, you will have to manually download the FullStory command line tool so you can add it as a build script
There are two remote command options:
- Use a JSON configuration file (Recommended), hosted either remotely or locally within the app.
- Use iQ Tag Management to configure the mappings and add the Remote Command tag for the vendor integration.
For more information, see vendor integrations.
Install
Dependency manager
We recommend installing modules with one of the following dependency managers:
- In your Xcode project, select File > Add Packages… > Add Package Dependency.
- Enter the following repository URL:
https://github.com/tealium/tealium-ios-fullstory-remote-command
. - Configure the version rules. We recommend the
Up to next major
setting. If the currentTealiumFullstory
version does not appear in the list, then reset your Swift package cache. - Select the
TealiumFullstory
module to install, and select the app target you want the module to be installed in.
If your project has more than one app target and needs the TealiumFullstory
module in more app targets, you have to manually add them in the Frameworks, Libraries, and Embedded Content section.
To install TealiumFullstory
in additional app targets:
- Select your Xcode project in the Project Navigator.
- In your Xcode project, select the app target under the TARGETS section.
- Navigate to General > Frameworks, Libraries & Embedded Content and select the
TealiumFullstory
module to add it to your app target.
To add additional modules from the Tealium Swift library, follow the Swift Package Manager instructions.
To install FullStory remote commands for iOS using CocoaPods:
- Remove
tealium-swift
if it already exists your Podfile. The dependency fortealium-swift
is already included in theTealiumFullstory
framework. - Add the following dependency to your Podfile:
pod "TealiumFullstory"
The TealiumFullstory
pod includes the following TealiumSwift
dependencies:
'tealium-swift/Core'
'tealium-swift/TealiumRemoteCommands'
'tealium-swift/TealiumTagManagement'
- Import the modules
TealiumSwift
andTealiumFullstory
into yourTealiumHelper
file, and any other files that access theTealium
class, or the FullStory Remote Command.
To install FullStory remote commands for iOS using Carthage:
- Remove
tealium-swift
from your Cartfile. The dependency fortealium-swift
is already included in theTealiumFullstory
framework. - Add the following dependency to your Cartfile:
github "tealium/tealium-ios-fullstory-remote-command"
To install FullStory remote commands for Android using Maven:
- Install Tealium for Android
(Kotlin) or Tealium for Android (Java) and add the Tealium Maven URL to your project’s top-level
build.gradle
file, if you haven’t done so already.
allprojects {
repositories {
mavenCentral()
maven {
url "https://maven.tealiumiq.com/android/releases/"
}
}
}
- Import both the FullStory SDK and Tealium-FullStory remote commands by
adding the following dependencies in your app project’s
build.gradle
file:
dependencies {
implementation 'com.tealium.remotecommands:fullstory:1.0.0'
}
- Add the FullStory gradle plugin to your App/Module
build.gradle
. Replace<PLUGIN PROPERTIES>
with available properties:
fullstory {
<PLUGIN PROPERTIES>
}
Manual installation (iOS)
The manual installation for FullStory remote commands requires the Tealium for Swift library to be installed. To install the FullStory remote commands for your iOS project:
- Install the FullStory SDK, if you haven’t already done so.
- Clone the Tealium iOS FullStory remote command repo and drag the files in the
Sources
folder into your project. - Add
Dispatchers.RemoteCommands
as a dispatcher. - Set the
remoteAPIEnabled
configuration flag totrue
.
Initialize
For all Tealium libraries, register the FullStory remote commands when you initialize.
Android (Kotlin)
Initialize remote commands with a JSON configuration file or the Remote Command tag for Tealium’s Android (Java) library.
The following code is designed for use with the JSON Remote Commands feature, using the local file option:
val config = TealiumConfig(application,
"ACCOUNT",
"PROFILE",
Environment.DEV,
dispatchers = mutableSetOf(Dispatchers.RemoteCommands));
var tealium = Tealium.create(TEALIUM_MAIN, config) {
// Initialize FullStory Remote Command
val fullstoryCommand = FullStoryRemoteCommand()
// register the command
remoteCommands?.add(fullstoryCommand, filename =
"tealium-fullstory.json")
}
The following code is designed for use with the Remote Command tag feature:
val config = TealiumConfig(application,
"ACCOUNT",
"PROFILE",
Environment.DEV,
dispatchers = mutableSetOf(Dispatchers.RemoteCommands));
var tealium = Tealium.create(TEALIUM_MAIN, config) {
// Initialize FullStory Remote Command
val fullstoryCommand = FullStoryRemoteCommand()
// register the command
remoteCommands?.add(fullstoryCommand)
}
Android (Java)
The JSON Remote Command file feature for Android is only available in the Kotlin SDK.
The following code is designed for use with the Remote Command tag feature:
Tealium.Config config = Tealium.Config.create(application, "ACCOUNT",
"PROFILE", "ENVIRONMENT");
Tealium teal = Tealium.createInstance(TEALIUM_MAIN, config);
FullstoryRemoteCommand fullstory = new FullstoryRemoteCommand();
// register the command
teal.addRemoteCommand(fullstory);
iOS (Swift)
Initialize remote commands with a JSON configuration file or the Remote Command tag for Tealium’s iOS (Swift) library.
The following code is designed for use with the JSON Remote Commands feature, using the local file option:
var tealium : Tealium?
let config = TealiumConfig(account: "ACCOUNT",
profile: "PROFILE",
environment: "ENVIRONMENT",
dataSource: "DATASOURCE",
optionalData: nil)
config.dispatchers = [Dispatchers.TagManagement,
Dispatchers.RemoteCommands]
config.remoteAPIEnabled = true // Required to use Remote Commands
tealium = Tealium(config: config) { _ in
guard let remoteCommands = self.tealium?.remoteCommands else {
return
}
let fullstory = FullstoryRemoteCommand(type: .local(file:
"fullstory"))
remoteCommands.add(fullstory)
}
The following code is designed for use with the Remote Command tag feature:
var tealium : Tealium?
let config = TealiumConfig(account: "ACCOUNT",
profile: "PROFILE",
environment: "ENVIRONMENT",˜˜
dataSource: "DATASOURCE",
optionalData: nil)
config.dispatchers = [Dispatchers.TagManagement,
Dispatchers.RemoteCommands]
config.remoteAPIEnabled = true // Required to use Remote Commands
tealium = Tealium(config: config) { _ in
guard let remoteCommands = self.tealium?.remoteCommands else {
return
}
let fullstory = FullstoryRemoteCommand()
remoteCommands.add(fullstory)
}
JSON template
If you are configuring remote commands using a JSON configuration file, refer to the following template to get started. The template includes common mappings used in a standard e-commerce installation. Edit the mappings as needed.
{
"config": {},
"mappings": {
"tealium_event": "event_name",
"uid": "uid_str",
"email": "user_variables.email_str",
"phone": "user_variables.phone_str",
"cart_id": "event.cart_id_str",
"product_id": "event.product_id_str",
"price": "event.price_real",
"name": "event.name_str",
"category": "event.categoryProperties"
},
"commands": {
"launch": "logevent",
"identify_user": "identify",
"tealiumSampleEvent": "logevent",
"tealiumSampleEventWithData": "logevent"
}
}
Supported methods
We map a command to each FullStory method. To trigger a FullStory method, pass the corresponding command in the specified format.
Remote Command | FullStory Method |
---|---|
logevent |
logEvent() |
identify |
identifyUser() |
setuservariables |
setUserData() |
Since the FullStory SDK is installed alongside the Tealium SDK, you can trigger any native FullStory functionality by calling the SDK directly, even if the functionality is not provided by the Tealium FullStory Remote Command tag.
SDK setup
Initialize
The FullStory SDK is initialized automatically upon launch.
FullStory Developer Guide: Initial SDK Setup
Log event
Remote Command | FullStory Method |
---|---|
logevent |
event |
Parameter | Type |
---|---|
eventName (required) |
String |
eventData |
Map |
FullStory Developer Guide: Log Event
Identify
Remote Command | FullStory Method |
---|---|
identify |
identifyUser |
Parameter | Type |
---|---|
id (required) |
String |
data |
Map |
FullStory Developer Guide: Identify
Set user variables
Remote Command | FullStory Method |
---|---|
setuservariables |
setUserData |
Parameter | Type |
---|---|
data (required) |
Map |
The data
parameter takes an object of key-value pairs, where keys are strings
and the values are suffixed with the data type (for example: _str
, _int
, _bool
). For more information, see FullStory’s Setting-custom API properties documentation
FullStory Developer Guide: Set User Variables
This page was last updated: February 7, 2024