Advanced Plugin Settings

Advanced Plugin Settings

by ‎03-22-2018 07:39 AM - edited ‎03-22-2018 08:39 AM (102 Views)

Tealium Collect

By default, the core iOS and Android libraries send Tealium Collect data to the "main" profile in your Tealium account if you do not specify an alternative. The Cordova plugin allows you to override this behavior by passing one of two parameters in the config object:

collectDispatchURL

Example code below. See API Definition for more details

function tealInit (accountName, profileName, environmentName, instanceName) {
tealium.init({account : accountName, 
				profile : profileName, 
				environment : environmentName, 
				instance : instanceName || window.tealium_instance				, isLifecycleEnabled: "true"
             , collectDispatchURL:"https://collect.tealiumiq.com/vdata/i.gif?tealium_account="+accountName+"&tealium_profile="+profileName
            });
}

collectDispatchProfile

Example code below. See API Definition for more details.

This is only effective if no value has been passed for the collectDispatchURL parameter.

function tealInit (accountName, profileName, environmentName, instanceName) {
tealium.init({account : accountName, 
                profile : profileName, 
                environment : environmentName, 
                instance : instanceName || window.tealium_instance,
                isLifecycleEnabled: "true"
             , collectDispatchProfile:profileName
            });
}

Automatic Lifecycle Tracking

Automatic Lifecycle Tracking is generally a requirement for Adobe Analytics. If you do not need it, you can disable this feature by passing a string value of "false" for the isLifecycleEnabled parameter in the config object. See API Definition for more details

function tealInit (accountName, profileName, environmentName, instanceName) {
tealium.init({account : accountName, 
                profile : profileName, 
                environment : environmentName, 
                instance : instanceName || window.tealium_instance,
                isLifecycleEnabled: "false"
            });
}

Log Level

This setting controls the amount of log output the plugin writes to the JavaScript console. If you do not pass an explicit value, the default setting depends on the current environment ("dev" -> tealium.logLevels.DEV, "qa" -> tealium.logLevels.QA, "prod" -> tealium.logLevels.PROD). Full description in API Definition

function tealInit (accountName, profileName, environmentName, instanceName) {
tealium.init({account : accountName, 
                profile : profileName, 
                environment : environmentName, 
                instance : instanceName || window.tealium_instance,
                isLifecycleEnabled: "true",
                logLevel: tealium.logLevels.DEV
            });
}

Crash Reporter

This setting enables the Crash Reporter feature (currently Android only). This feature is disabled by default, and even if you enable it here, it will only become active once you have installed the separate Crash Reporter Plugin.

function tealInit (accountName, profileName, environmentName, instanceName) {
tealium.init({account : accountName, 
                profile : profileName, 
                environment : environmentName, 
                instance : instanceName || window.tealium_instance,
                isLifecycleEnabled: "true",
                logLevel: tealium.logLevels.DEV,
                isCrashReporterEnabled: "true" // enable crash reporter on Android only
            });
}