Set Log Level
indigitall allows developers to access all the information that the log provides us.
You can set the variable logLevel with a enum with the differents levels you want to see, the messages corresponding to the level of error warning to which we have subscribed will appear.
You can check the code extract below.
<script
src="/en/indigitall/sdk.min.js"
onload="indigitall.init({
...
//DEBUG // WARNING // ERROR
logLevel: indigitall.LogLevel.ERROR,
...
})"
async>
</script>
Associate the device with a user
You can associate your own ID to each device. In this way it will be easier and more intuitive for you to work with our tool. For example:
- If your users have been identified, you could use your user ID, or email, or any other data that you are used to working with.
This option will be to update the device information, so calling the DeviceCallback method will return a device if this operation was successful. To do this, you need to add the following code:
// Remember to replace with your external code
indigitall.setExternalCode("YOUR_EXTERNAL_CODE", (device) => {
//DO SOMETHING
}, (error) => {
//LOG ERROR
});
Do not you worry about anything. Your IDs are irreversibly encrypted on the phone itself and sent securely to our servers. Not even the indigitall team can know this information.
Custom domain
if you are ENTERPRISE CUSTOMER you have to add this parameter in the configuration so that the SDK points to the correct environment:
<script
src="/en/indigitall/sdk.min.js"
onload="indigitall.init({
...
urlDeviceApi: "YOUR_DEVICE_API_DOMAIN",
urlInappApi: "YOUR_INAPP_API_DOMAIN",
urlInboxApi: "YOUR_INBOX_API_DOMAIN",
...
})"
async>
</script>
Request permission from push notifications
Through these permissions, applications will be able to show the notifications sent by the indigitall tool.
To request the status of the permissions for push notifications, the callback requestPushPermission must be added to the initial configuration.
This method does not work on Edge and Safari because these browsers do not implement the Permissions API
You can check the example code below:
<script>
function requestPushPermission(permission){
console.log("RequestPushPermission: "+permission.state);
}
</script>
<script
src="/en/indigitall/sdk.min.js"
onload="indigitall.init({
...
requestPushPermission: requestPushPermission
...
})"
async>
</script>