> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usedynamite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Read /start/capabilities before choosing an integration. Use the deployed server’s tools/list for current tool inputs.

# Consent

> Connect your consent manager to Dynamite.

Add `data-consent="required"` to the [installation tag](https://docs.usedynamite.com/integrate/script.md). Then pass consent changes to Dynamite:

```js theme={null}
function updatePersonalizationConsent(granted) {
  window.dynamite = window.dynamite || [];
  window.dynamite.push(['consent', granted === true]);
}
```

Before a grant, Dynamite does not initialize visitor memory, fetch configuration, make decisions, or send measurement. The script itself still downloads; let your consent manager load the tag if that must wait too.

## Withdraw consent

`consent(false)` stops the runtime, restores original content, discards pending tracker events, and clears visitor/enrichment storage on the site. It keeps the denial so the next page does not restart personalization.

Already-sent events remain on the server. This method does not erase account data.

> [accordion] Storage details
>
> The consent choice is stored in `localStorage['dynamite:consent']`. A remembered grant allows later page loads to start. Without the required attribute, startup is immediate unless a denial was stored.
>
> Withdrawal removes localStorage keys starting with `ion:visitor` or `ion:enrichment`, sessionStorage keys starting with `ion:`, and the `dynamite_enrichment` cookie. Check for naming conflicts on your origin.
>
> Visitor memory can fall back to in-memory storage. Required consent depends on localStorage; blocked storage can prevent a grant from starting the runtime.
>
> See [Visitor memory](https://docs.usedynamite.com/internals/visitor-memory.md) for profile storage and custom profile sources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.