npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deltax-sdk/cordova-plugin-deltax-mobile-sdk

v1.0.1

Published

## DeltaX Mobile SDK Cordova Plugin

Readme

cordova-plugin-deltax-mobile-sdk

Description

Cordova-plugin-deltax-mobile-sdk is a cordova plugin which allows you to use the DeltaX Mobile SDK in your cordova-based hybrid applications. The support is currently limited to the android platform.

Usage

Get access to plugin:

Plugin will be available in window object once cordova is initialised. You can listen to document ready event and initialise the plugin. In Ionic, you can access it after platform ready.

https://ionicframework.com/docs/utilities/platform#ready-promise-string-

var dxPlugin = {};

if(window && window.DeltaXMobileSDK){

    dxPlugin = window.DeltaXMobileSDK;

}

Note: You need to maintain this dxPlugin object. Alternatively, you can skip this step and access the sdk using window.DeltaXMobileSDK. Example: window.DeltaXMobileSDK.initDxTracker(['xxxx1234']);

Initialise SDK:

	initDxTracker(businessProfileEncodedIds, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | businessProfileEncodedIds | String[ ] | Array of business profile encoded ids to initialise trackers | | success | ( ) => void | Success callback - called after successful initialization (optional) | | failure | (err : Object) => void | Failure callback - called if initialization fails (optional) |

Example:

dxPlugin.initDxTracker( ['xxxx1234', 'xxxx6789'] ,

					    ( ) => {
					    
					    //Statements to execute on success
					    
					    },
					    
					    ( ) => {
					    
					    //Statements to execute on failure
					    
					    }
); 

Note: The first BusinessProfileEncodedId in the first call to initDxTracker is set as the default tracker by the SDK. If you wish to change the default tracker, setDefaultTracker must be called explicitly.

Set Default Tracker Instance:

setDefaultTracker(businessProfileEncodedId, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | businessProfileEncodedId | String | Array of business profile encoded ids to initialise trackers | | success | ( ) => void | Success callback - called after successfully setting default tracker (optional) | | failure | (err : Object) => void | Failure callback - called if setting default tracker fails (optional) |

Example:

dxPlugin.setDefaultTracker( 'xxxx6789'); 

Set Default Customer Id:

Note: This value can be overridden when you're tracking a particular event.

setCustomerId(params, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | params | Object| Options and value to be passed | | success | ( ) => void | Success callback - called after successfully setting customer id (optional) | | failure | (err : Object) => void | Failure callback - called if setting customer id fails (optional) |

params

| name| type | default| description| | ------------- |-------------| -----| ----| | Value| String| | Default Customer Id to be set for a specific tracker instance| | BusinessProfileEncodedId| String |undefined | Id of the tracker for which customer id is to be set. If not passed, default customer id will be set for the default tracker instance |

Example:

// Specify business profile for which property is to be set

var params = {

    Value: '123',
    
    BusinessProfileEncodedId: 'xxxx1234'

};

dxPlugin.setCustomerId(params); 
// Apply property for default tracker

var params = {
    Value: '123'
};

dxPlugin.setCustomerId(params); 

Set Default Customer Phone Number and Default Customer Email:

Note: These values can be overridden when you're tracking a particular event.

setCustomerPhoneNumber(params, success, failure)

setCustomerEmail(params, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | params | Object| Options and value to be passed | | success (optional) | ( ) => void | Success callback - called after successfully setting customer email/phone number| | failure (optional)| (err : Object) => void | Failure callback - called if setting customer email/phone number fails |

params

| name| type | default| description| | ------------- |-------------| -----| ----| | Value| String| | Default Customer Email / Phone Number to be set for a specific tracker instance| | BusinessProfileEncodedId (optional)| String |undefined | Id of the tracker for which customer id is to be set. If not passed, default customer id will be set for the default tracker instance | |IsEncoded (optional)|Boolean|false|By default, the SDK assumes the given value is not encoded and encodes it before an event is triggered. If IsEncoded is passed as true, then you are required to pass encoded Customer Email/Phone Number.|

// Specify business profile for which property is to be set
// Since IsEncoded is not passed in params, SDK will encode it

var params = {
    Value: '[email protected]',
    BusinessProfileEncodedId: 'xxxx1234'
};

dxPlugin.setCustomerEmail(params);

  
// Since IsEncoded is set to true, SDK expects encoded value to be passed

var params = {
    Value: '52baew13c1',
    IsEncoded: true,    
    BusinessProfileEncodedId: 'xxxx1234'    
};

dxPlugin.setCustomerPhoneNumber(params); 

Track event:

trackEvent(params, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | params | Object| Options and value to be passed | | success (optional) | ( ) => void | Success callback - called after event has been tracked successfully| | failure (optional)| (err : Object) => void | Failure callback - called if event tracking fails |

params

| name| type | default| description| | ------------- |-------------| -----| ----| | BusinessProfileEncodedId (optional)| String |undefined | Id of the tracker for which customer id is to be set. If not passed, default customer id will be set for the default tracker instance | |TransactionId|String|undefined|If passed, the value will be used as event parameter| |CurrencyCode|String|undefined|If passed, the value will be used as event parameter| |TransactionValue|String|undefined|If passed, the value will be used as event parameter| | Quantity|String|undefined|If passed, the value will be used as event parameter| | CustomerId|String|undefined|If passed, the value will be used as event parameter| | CustomerMail|String|undefined|If passed, the value will be used as event parameter| |CustomerPhone|String|undefined|If passed, the value will be used as event parameter| |GoalId|String|undefined|If passed, the value will be used as event parameter| |Stage1|String|undefined|If passed, the value will be used as event parameter| |Stage2|String|undefined|If passed, the value will be used as event parameter| |Stage3|String|undefined|If passed, the value will be used as event parameter| | Stage4|String|undefined|If passed, the value will be used as event parameter| |Stage5|String|undefined|If passed, the value will be used as event parameter| |Stage6|String|undefined|If passed, the value will be used as event parameter| |Stage7|String|undefined|If passed, the value will be used as event parameter| |Stage8|String|undefined|If passed, the value will be used as event parameter| |Stage9|String|undefined|If passed, the value will be used as event parameter| | Stage10|String|undefined|If passed, the value will be used as event parameter| | XCart|String|undefined|If passed, the value will be used as event parameter|

Note: Setting values for CustomerId/CustomerMail/CustomerPhone will override the default value for the particular tracker for this particular event.

Example:

// If default customer properties (Id, Phone Number, Email) have been set for the tracker 'xxxx1234', they will also be part of the event

var params = {
    BusinessProfileEncodedId: 'xxxx1234',  
    GoalId : '6AMDX4',    
    Quantity : '1'    
};

dxPlugin.trackEvent(params); 
// Since BusinessProfileEncodedId is not passed in params, default tracker instance will be used.

var params = {
    GoalId : '6AMDX4',
    Quantity : '1'
};

dxPlugin.trackEvent(params); 

Track deep links:

trackClick(params, success, failure)

| parameter | type | description| | ------------- |-------------| -----| | params | Object| Options and value to be passed | | success (optional) | ( ) => void | Success callback - called after deeplink click has been tracked successfully | | failure (optional)| (err : Object) => void | Failure callback - called if deeplink tracking fails |

params

| name| type | default| description| | ------------- |-------------| -----| ----| | Value| String| | Default Customer Email / Phone Number to be set for a specific tracker instance| | BusinessProfileEncodedId (optional)| String |undefined | Id of the tracker for which customer id is to be set. If not passed, default customer id will be set for the default tracker instance | |Uri|String|| Full URI string of the deep link|

Example:

var params = {
    BusinessProfileEncodedId: 'xxxx1234',
    Uri: 'https://www.mytestdomain.com/test/123'
};

dxPlugin.trackClick(params);

Disable tracking:

disableTracking(success,failure)

| parameter | type | description| | ------------- |-------------| -----| | success (optional) | ( ) => void | Success callback - called after successfully disabling tracking | | failure (optional)| (err : Object) => void | Failure callback - called if disable tracking fails |

Example:

dxPlugin.disableTracking();

Enable tracking:

enableTracking(success,failure)

| parameter | type | description| | ------------- |-------------| -----| | success (optional) | ( ) => void | Success callback - called after successfully enabling tracking| | failure (optional)| (err : Object) => void | Failure callback - called if enable tracking fails |

Example:

dxPlugin.enableTracking();