This plugin implements UserCentrics SDK features for Cordova applications.
Install it via the Cordova CLI.
cordova plugin add https://github.com/platogo/cordova-plugin-usercentrics.git
note: currently supports only Android
initialize usercentrics
cordova.plugins.UserCentrics.initialize(
function (success) {
console.log(success);
},
function (error) {
console.error(error);
}
);
cause consent banner to show
cordova.plugins.UserCentrics.isReady(
function (success) {
console.log(success);
},
function (error) {
console.error(error);
}
);
clear user session
cordova.plugins.UserCentrics.clearUserSession(
function (success) {
console.log(success);
},
function (error) {
console.error(error);
}
);
get google consents
cordova.plugins.UserCentrics.getGoogleConsents(
function (success) {
console.log(success);
},
function (error) {
console.error(error);
}
);
this repo uses the ISC license