Adobe Visitor Service Module
This document explains how to install the Tealium Adobe Visitor Service Module for Flutter.
Tealium for Flutter allows you to use the Tealium mobile libraries (iOS, Android) to install the Adobe Visitor Service Module for the Tealium Flutter plugin.
How It Works
Tealium mobile libraries are integrated into your Flutter application using one of the following methods:
- Dart package (recommended)
- Manual via GitHub
Requirements
- Flutter application development framework
- IDE such as Android Studio or VS Code
- Flutter plugin installed on the IDE
Install
To install the Tealium library for Flutter:
- In your Flutter app project, run
dart pub add tealium_adobevisitor
- Import the Dart code to your project:
import 'package:tealium_adobevisitor/common.dart';
Dart
To import the relevant classes into your app, do the following:
import TealiumAdobeVisitor from 'tealium-flutter-adobe-visitor';
import { TealiumAdobeVisitorConfig } from 'tealium-flutter-adobe-visitor/common';
Initialize
Configure the Adobe Visitor Service module prior to initializing the main Tealium Flutter integration.
let adobeVisitorConfig: TealiumAdobeVisitorConfig = {
adobeVisitorOrgId: "ADOBE-ORG-ID",
adobeVisitorRetries: 1,
adobeVisitorAuthState: AuthState.authenticated,
// If you do not set a value for any of the following three lines, remove that line.
adobeVisitorExistingEcid: "",
adobeVisitorDataProviderId: "",
adobeVisitorCustomVisitorId: ""
}
TealiumAdobeVisitor.configure(adobeVisitorConfig);
API Reference
After the Adobe Visitor Service Module and the main Tealium Flutter integration have both been initialized, you can link an existing Adobe visitor.
linkEcidToKnownIdentifier(id, providerId, authState)
Links existing Experience Cloud ID (ECID) to known identifier.
TealiumAdobeVisitor.linkEcidToKnownIdentifier("myidentifier", "123456", AuthState.unknown)
getAdobeVisitor(callback)
Get the current Adobe visitor information.
TealiumAdobeVisitor.getAdobeVisitor()
.then((visitor) => {print(visitor)});
decorateUrl(url, callback)
Decorates the URL with ECID visitor data.
TealiumAdobeVisitor.getUrlParameters().then(
(value) =>
value?.forEach((key, value) {
print("Retrieved URL Parameters: $key = $value");
})
)
getUrlParameters(callback)
Retrieves URL parameters containing the Adobe Visitor ID to be manually appended to a URL.
TealiumAdobeVisitor.getUrlParameters().then(
(value) =>
value?.forEach((key, value) {
print("Retrieved URL Parameters: $key = $value");
})
)
resetVisitor()
Reset current visitor.
TealiumAdobeVisitor.resetVisitor();
This page was last updated: March 15, 2024