How to add a cookie consent banner to a Duda website
On Duda, paste the snippet in the side panel under More, then Settings, then Header HTML, in the Head HTML field, and republish. Custom code is available on Duda's Team plan and higher. Because Duda moves scripts lower in the page for speed, every tracking script must be marked with type="text/plain" and a data-cq-category, and Duda's own cookie notification should be switched off.Steps
Where to paste the snippet in Duda
Duda's custom code is available on Team plans and higher. In the editor's side panel, click More, then Settings, then Header HTML. The Head HTML field adds content to the head of every page; Body End HTML adds code before the closing body tag. Paste the snippet at the top of Head HTML, save, and republish:
html<script src="https://cookiequiet.com/cq.js" data-site="YOUR_SITE_KEY" data-consent-mode="1" data-auto-block="1" defer></script>
The head field takes <script>, <link> and <meta> tags; Duda drops other elements placed there. A single page can also have its own Header HTML (Pages, the page's settings icon, then SEO), which is for code that belongs to one page only.
If an agency or reseller manages your Duda site, your account may not have access to code. Ask them to add the snippet, or to give you developer access.
Why every tracking script must be marked on Duda
Duda documents that it optimizes the order in which content loads and places scripts and consent banners lower in the page, and that consent apps therefore cannot stop code in the Head HTML from running before consent. In practice, on Duda you cannot rely on the snippet loading before other tags. You can rely on marking: a script with type="text/plain" never runs on its own, wherever Duda puts it, and Cookiequiet starts it after consent for its category.
So mark every tracking script in Head HTML, Body End HTML and page-level Header HTML. For the Google tag, both script tags change:
html<script type="text/plain" data-cq-category="analytics" src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script><script type="text/plain" data-cq-category="analytics">window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-XXXXXXX');</script>
The Meta Pixel and TikTok pixel get data-cq-category="marketing"; a chat widget gets functional. The guide to blocking scripts until consent shows the other patterns. Videos in an HTML widget can use data-cq-src instead of src on the iframe so they load after consent.
If you entered a Google Analytics ID in Duda's settings, Duda prints that tag itself and you cannot mark it. Remove it there and use the marked tag above, or route Google tags through Google Tag Manager with Consent Mode.
How does Duda's own cookie notification interact?
Duda's Privacy Settings (More, then Settings, then Privacy Settings) hold two related switches:
- Activate cookie notification shows every visitor a notification that information about their visit is collected in cookies; Duda does not describe per-category choices or a consent record for it. Turn it off once Cookiequiet is live, so visitors see one banner.
- Enable cookie tracking on this site is on by default. Turning it off stops Duda's own statistics and its Google Analytics integration, prevents personalization rules from adding cookies, and stops tracking code you have added. Third-party widgets such as social embeds still set cookies, as Duda notes. Most sites keep it on and let Cookiequiet hold the tags; turn it off only if you want no Duda statistics at all.
Duda's customizable privacy page (in the same settings) is separate from cookies; Cookiequiet's policies, written from the scan, can replace or complement it.
How to add the Cookie preferences link
Duda shares the header and footer across all pages, and an HTML widget placed in either appears everywhere. Drag an HTML widget into the footer and paste:
html<a href="#cq-preferences" data-cq-show-preferences>Cookie preferences</a>
How to test
- Republish, then open the live site (not the editor preview) in a private window.
- Click Reject all and check the cookies in the developer tools:
cq_consentand nothing from Google or Meta. - Clear the cookies, click Accept all, reload: the marked tags run.
- Check the consent log in the Cookiequiet dashboard.
Agencies running several Duda sites can use the Agency plan, €19 per month for 10 Pro websites and 5 team seats; a single site is free with geo-targeting included, and Starter is €3 per website per month.