> For the complete documentation index, see [llms.txt](https://docs.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.didomi.io/consent-management-platform-cmp/consent-notices/configure-no-interaction-timer-as-consent-refusal.md).

# Configure no-interaction timer as consent refusal

The non-interaction with the banner after x seconds can be set up as a refusal.

You can set this up as you wish thanks to a script that you can integrate to your website.

To do so, follow the steps below!

#### Choose the length of the absence of interaction with the consent notice

Decide how long you want to set the inactivity for, to count the latter as a cookie denial.&#x20;

In the script we're suggesting you, the inactivity is set to 5 seconds.&#x20;

⚙️ The banner will be displayed when the user access a website. Then, if the user has no interaction with the consent notice for 5 seconds (in this case), the user choice will be considered as a denial.&#x20;

#### Insert the script to set up the option

You have to insert the script below anywhere in your HTML. This script is a standard code that you can adapt depending on your situation.

The script works on all browsers.&#x20;

&#x20;

```
<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>
```

You are totally free to change the inactivity length set to 5 seconds here (cf. code below)!

```
var timeout_value = 5000
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.didomi.io/consent-management-platform-cmp/consent-notices/configure-no-interaction-timer-as-consent-refusal.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
