Skip to main content
Version: v6

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?

Don't waste precious time on plugin issues.

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

$ npm install tealium-cordova-plugin 
$ npm install @awesome-cordova-plugins/tealium
$ ionic cap sync

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"});
});