0.0.2 • Published 6 years ago

cordova-plugin-sift-science v0.0.2

Weekly downloads
4
License
Apache 2.0
Repository
github
Last release
6 years ago

cordova-plugin-sift-science

Sift Science Integration Plugin for Cordova Apps

To install the plugin:

cordova plugin add cordova-plugin-sift-science

To use the plugin:

In $ionicPlatform.ready add the following lines:

var jsSnippetKey = 'YOUR JS SNIPPET';
var accountID = 'YOUR ACCOUNT ID';
var sessionID = 'A SESSION ID FOR THE USER';
var userID = '';
SiftJs.initSift(jsSnippetKey, accountID, sessionID, userID);

When you can ID the user:

SiftJs.setUserID('YOUR ID');

When a user switches views in your app:

SiftJs.trackPageView();

When a user logs out:

SiftJs.unsetUserID();