getOptOutConfiguration
The Capacitor SDK allows you to opt a user out of various levels of tracking, such as all, and/or city/country tracking, and also opt them back in based on your app's privacy configuration.
getOptOutConfiguration(): Promise<MXOResult<MXOOptOutConfiguration>>
Example of usage:
MedalliaMXO.getOptOutConfiguration()
.then(mxoResult => {
if (mxoResult.value && mxoResult.value.apiName) {
// error case
console.error(mxoResult.value)
} else {
// success case
console.log("Configuration: ", mxoResult.value)
}
})
.catch(error => {
console.error(error)
})
try {
const {value} = await MedalliaMXO.getOptOutConfiguration()
if (value && value.apiName) {
// error case
console.error(value)
} else {
// success case
console.log("Configuration: ", value)
}
} catch (error) {
console.error(error)
}