Adobe Visitor Service Module
Learn to install Tealium Adobe Visitor Service Module for React Native.
Tealium for React Native allows you to use the Tealium mobile libraries (iOS, Android) in your React Native application.
How It Works
Tealium mobile libraries are integrated into your React Native application using one of the following two methods:
- NPM package (recommended)
- Manual via GitHub
Requirements
- Access to your native build environments
- Tealium for React Native 2.2.0+
- React Native 0.63+ and tools installed
- Tealium iQ Mobile Profile
- Android Studio or Xcode
- Tealium for Android or Tealium for iOS
Install (NPM/YARN)
To install the Tealium Adobe Visitor module for React Native with NPM:
-
Follow the installation instructions for the main
tealium-react-native
library installation here. Ensure you have installed at least version 2.2.0 or above. -
Navigate to the root of your React Native project.
-
Download and install the
tealium-react-native-adobe-visitor
package with the following command:yarn install tealium-react-native-adobe-visitor
JavaScript
To import the relevant classes into your app, do the following:
import TealiumAdobeVisitor from 'tealium-react-native-adobe-visitor';
import { TealiumAdobeVisitorConfig } from 'tealium-react-native-adobe-visitor/common';
Initialize
Configure the Adobe Visitor module prior to initializing the main Tealium React Native integration.
let adobeVisitorConfig: TealiumAdobeVisitorConfig = {
adobeVisitorOrgId: "ADOBE-ORG-ID",
adobeVisitorExistingEcid: "",
adobeVisitorRetries: 1,
adobeVisitorAuthState: AuthState.authenticated,
adobeVisitorDataProviderId: "",
adobeVisitorCustomVisitorId: ""
}
TealiumAdobeVisitor.configure(adobeVisitorConfig);
API Reference
After the Adobe Visitor Module and the main Tealium React Native integration have both been initialized, you can link an existing Adobe visitor.
linkEcidToKnownIdentifier(id, providerId, authState, callback)
Links existing ECID to known Identifier.
TealiumAdobeVisitor.linkEcidToKnownIdentifier(id, providerId, authState, value => {
console.log("AdobeVisitor Data: " + JSON.stringify(value))
});
getAdobeVisitor(callback)
Get the current Adobe visitor information
TealiumAdobeVisitor.getAdobeVisitor(value => {
console.log("Current Adobe Visitor: " + JSON.stringify(value))
});
decorateUrl(url, callback)
Decorates the URL with ECID visitor data.
TealiumAdobeVisitor.decorateUrl(("https://tealium.com", value => {
console.log("Decorated URL: " + value);
});
resetVisitor()
Reset current visitor.
TealiumAdobeVisitor.resetVisitor();
This page was last updated: March 17, 2023