Search docs/

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.

Contact Us Today!

Installation

ionic cordova plugin add tealium-cordova-pluginnpm install @ionic-native/tealium
Ionic Native 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

import { Tealium, TealConfig } from '@ionic-native/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"});
});