Configure no-interaction timer as consent refusal
Choose the length of the absence of interaction with the consent notice
Insert the script to set up the option
<script type="text/javascript">
// Choose a duration for your user inaction (in ms)
var timeout_value = 5000;
// Check if the notice is displayed
window.didomiEventListeners = window.didomiEventListeners || [];
window.didomiEventListeners.push({
event: 'notice.shown',
listener: function () {
// Check if the notice was displayed because we need to collect a consent
if(Didomi.shouldConsentBeCollected()){
setTimeout(function(){
// Set your user consent status to false
Didomi.setUserDisagreeToAll();
// We also suggest that you display a message to tell your users you consider their inaction as a refusal of the notice
// Add your code here to inform your users
}, timeout_value);
}
}
});
</script>Last updated