Tealium
This plugin provides a TypeScript wrapper around the Tealium Cordova plugin for Ionic Native.
For full documentation, see https://community.tealiumiq.com/t5/Mobile-Libraries/Tealium-for-Cordova/ta-p/17618
https://github.com/Tealium/cordova-plugin
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionicβs experts offer premium advisory services for both community plugins and premier plugins.
Installation
- Capacitor
- Cordova
- Enterprise
$ npm install tealium-cordova-plugin
$ npm install @awesome-cordova-plugins/tealium
$ ionic cap sync
$ ionic cordova plugin add tealium-cordova-plugin
$ npm install @awesome-cordova-plugins/tealium
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Β Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Android
- iOS
Usage
React
Learn more about using Ionic Native components in React
Angular
import { Tealium, TealConfig } from '@awesome-cordova-plugins/tealium/ngx';
constructor(private tealium: Tealium) { }
...
let tealConfig: TealConfig = {
account: "<your-account>",
profile: "<your-profile>",
environment: "<your-environment>", // usually "dev", "qa" or "prod"
isLifecycleEnabled: "true", // pass "false" to disable lifecycle tracking
isCrashReporterEnabled: "false", // pass "true" to enable crash reporter (Android only)
instance: "<your-instance-name" // an arbitrary instance name. use the same instance name for all subsequent API calls
}
this.tealium.init(tealConfig).then(()=>{
this.tealium.trackView({"screen_name": "homescreen"});
});