Adobe Visitor Service Module
Learn to install Tealium Adobe Visitor Service Module for React Native.
Tealium for React Native lets you 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)
- Manually with 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-nativelibrary 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-visitorpackage 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",
adobeVisitorRetries: 1,
adobeVisitorExistingEcid: "", // optional
}
TealiumAdobeVisitor.configure(adobeVisitorConfig);
Set the adobeVisitorCustomVisitorId, adobeVisitorDataProviderId, and adobeVisitorAuthState properties only if all three values are known at the start of the app session. Set adobeVisitorAuthState only when you also set adobeVisitorCustomVisitorId. If the visitor’s ID is not known at initialization (for example, before login), omit these properties and call linkEcidToKnownIdentifier once the ID becomes available.
let adobeVisitorConfig: TealiumAdobeVisitorConfig = {
adobeVisitorOrgId: "ADOBE-ORG-ID",
adobeVisitorRetries: 1,
adobeVisitorExistingEcid: "",
adobeVisitorDataProviderId: "DATA-PROVIDER-ID",
adobeVisitorCustomVisitorId: "CUSTOM-VISITOR-ID",
adobeVisitorAuthState: AuthState.authenticated
}
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);
});
getUrlParameters(callback)
Retrieves the Adobe Visitor URL parameters to be appended to a URL.
TealiumAdobeVisitor.getUrlParameters(value => {
if (value === null || value === undefined) {
console.log("Adobe Visitor was null");
return;
} else {
for (var key of Object.keys(value)) {
// Result: key = adobe_mc
// value = MCMID=1234|MCORGID=12345@AdobeOrg|TS=1655826247
// Only for demonstration purposes; call some method in your app that decorates the URL and then launches your webview
console.log("Retrieved URL Parameters: ", key + "=" + value[key]);
break;
}
}
});
resetVisitor()
Reset current visitor.
TealiumAdobeVisitor.resetVisitor();
This page was last updated: April 28, 2026