Platforms

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.
Published 21 October 2026 · By the Cookiequiet team · Markdown

Steps

Check your code accessCustom code is available on Duda's Team plan and higher. If an agency manages your site, it may need to give your account access to code.
Copy your snippetIn the Cookiequiet dashboard, open your website and copy the install snippet: one script tag with your site key, data-consent-mode and data-auto-block set to 1, and defer.
Paste it in Head HTMLIn the editor's side panel, click More, then Settings, then Header HTML. Paste the snippet at the top of the Head HTML field and save.
Mark every tracking scriptChange each tracking script in Head HTML, Body End HTML and page-level Header HTML to type="text/plain" with a data-cq-category. Move any Google Analytics ID from Duda's settings to a marked tag.
Turn off Duda's cookie notificationIn Settings, then Privacy Settings, switch off the Activate cookie notification toggle so visitors see one banner.
Add the Cookie preferences linkDrag an HTML widget into the site footer, which every page shares, and paste a link to #cq-preferences with the data-cq-show-preferences attribute.
Republish and testRepublish the site, open it in a private window, click Reject all and check that no _ga or _fbp cookie is set. Accept all, reload, and check the consent log.

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.

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.

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

  1. Republish, then open the live site (not the editor preview) in a private window.
  2. Click Reject all and check the cookies in the developer tools: cq_consent and nothing from Google or Meta.
  3. Clear the cookies, click Accept all, reload: the marked tags run.
  4. 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.

Questions

Duda lists custom code as available on Team plans and higher. On sites managed by an agency, the agency decides whether your account can edit code.
Duda reorders scripts for performance and places them, and consent banners, lower in the page. Code that is not marked runs before consent. Marking each script with type text/plain solves this, because a marked script does not run until Cookiequiet starts it.
No. Duda describes it as a notification that cookies are used, not as a per-category choice, and two banners confuse visitors. Switch it off in Privacy Settings once Cookiequiet is live.
Only if you want no Duda statistics at all. It also stops Duda's Google Analytics integration and the tracking code you added. Most sites keep it on and let Cookiequiet hold their marked tags until consent.

Put a quiet banner on your website today

Free for one website with every core feature, no card and no trial clock. Upgrade a website to Starter for $3 a month to match your brand with AI and drop the branding, or to Pro for $9 to design it with the AI agent.