Skip to setup

Cookie consent for Webflow sites you build.

Start with step 1
div.tc-banner

We use cookies

Essential cookies keep the site working. With your permission we also use analytics, marketing, and personalization cookies. You can change your choice at any time.

Privacy policy
  • 12 KB gzipped, from jsDelivr
  • One first-party cookie
  • GDPR, CCPA, or no banner
  • Honors Global Privacy Control
  • Six steps, about 5 min
  • No account
  1. Scan the site

    Paste the live site address. The scan reads sitemap.xml, then the HTML of each page, and adds every recognized tracker to the head snippet in the next step. On the published site those services show up in the preferences panel on every page, including pages that do not contain the tag.

    When a page loads Google Tag Manager, the scan reads that container and includes the tags configured there. A pixel that some other script injects only after the page runs is still invisible here. Add its id to data-tc-vendors on the head snippet, or tag it in step 3.

  2. Tag your trackers

    Four categories: essential, analytics, marketing, and personalization. Essential always runs. For every other tracker, change three things in its snippet:

    1. Set type="text/plain" so the browser does not run it.
    2. Rename src to data-tc-src.
    3. Add data-tc-category="analytics" (or the category it belongs to).
    <script type="text/plain" data-tc-src="https://www.googletagmanager.com/gtag/js?id=G-XXXX" data-tc-category="analytics"></script>
    <script type="text/plain" data-tc-category="analytics">
      window.dataLayer = window.dataLayer || [];
      function gtag(){ dataLayer.push(arguments); }
      gtag('js', new Date());
      gtag('config', 'G-XXXX');
    </script>

    Embeds

    YouTube, Vimeo, and Google Maps go in a Code Embed element with data-tc-src instead of src. An optional placeholder with the same category disappears once it is allowed.

    <div data-tc-element="placeholder" data-tc-category="marketing">
      This video loads after you allow marketing cookies.
      <a href="#" data-tc-element="open-preferences">Cookie settings</a>
    </div>
    <iframe data-tc-src="https://www.youtube-nocookie.com/embed/VIDEO_ID" data-tc-category="marketing" allowfullscreen></iframe>

    Remove <noscript> fallbacks from tracker snippets. They fire without consent.

    Good to know: untagged scripts, multiple categories

    Scripts from known tracker hosts (Google Analytics, GTM, Meta, Hotjar, LinkedIn, TikTok, HubSpot, YouTube, Intercom, and more) are blocked even when untagged, including ones injected later by other scripts. A tag that lists two categories (data-tc-category="analytics, marketing") runs only when both are allowed.

  3. Paste the component into the Designer

    One click puts the banner, the preferences panel, and the small Preferences button on your clipboard in Webflow's own format: native elements, classes with the default theme, and every data-tc attribute already set. Everything except three small icons is editable in the Style panel.

    Preparing the payload…

    Then, in the Designer

    1. Select the footer (or any component that is already on every page) and edit it so the paste lands inside.
    2. Press Cmd+V (Ctrl+V on Windows). A tc-root div appears with the banner (bottom-right), the preferences panel, and the Preferences button (bottom-left).
    3. Select tc-banner, tc-dialog, tc-button, and tc-float and swap the flat colors and fonts for your site's variables. Names, copy, and layout are free.
    States and visibility while you work
    • Each optional category has a switch: a checkbox field (tc-switch) with an invisible input over a track and a knob. The script adds the combo class is-on to the switch and its children while the category is allowed, and is-open to an accordion, its toggles, and the chevron icon while it is open. Both combos arrive with the paste (the Analytics switch is on and the Essential row is open), so style the on and open states there.
    • The pasted styles hide the preferences panel and the Preferences button, so a published page shows the banner. Opt-in is the head snippet's default (data-tc-mode="opt-in"): the script shows that banner on the first visit and the button only after a choice. Leave the banner's display alone. To style the panel or the button, set Display to Flex, then set it back to None before publishing. Accordion bodies are visible in the Designer and start closed on the published site.
    How the vendor list is built
    • Each category row is an accordion. Clicking the title or chevron opens the vendor list; each vendor opens its cookie table (name, purpose, duration).
    • The list is generated: on the published site the script scans the page for tracker scripts and embeds, matches them against a built-in registry (Google Analytics, Tag Manager, Meta Pixel, Google Ads, LinkedIn, TikTok, HubSpot, Hotjar, Clarity, YouTube, Vimeo, Intercom, and the rest of the block list) and clones the sample tc-vendor block once per match. Style the sample freely, but keep its data-tc-vendor and data-tc-field attributes. The tc-row_empty paragraph shows when nothing was found for a category.
    • Need a vendor the registry does not know, or a tag that fires server-side? Add it in Head code with window.TinyConsentVendors = [{ id, name, category, privacy, hosts, cookies }], or force a known one with data-tc-vendors="meta-pixel" on the script tag. A hand-written block with its own data-tc-vendor="some-id" is kept as it is.
    What the attributes do (keep these)
    AttributeWherePurpose
    data-tc="root"wrapper divEverything must stay inside it.
    data-tc="banner"banner divShown on first visit.
    data-tc="preferences"panel divCategory panel. Hidden until opened.
    data-tc="float"small buttonPersistent "Preferences" button. Shown after a choice, hidden while the banner or panel is open.
    data-tc-action="accept-all"buttonAllow every category.
    data-tc-action="reject-all"buttonDeny every optional category.
    data-tc-action="open-preferences"buttonOpen the panel.
    data-tc-action="save"buttonStore the switch selection.
    data-tc-action="close"button, backdropClose the panel.
    data-tc-action="toggle"chevron button, row title, vendor headOpens and closes the accordion it sits in. An accordion can have several toggles; all of them reflect the state. A link inside a toggle (the privacy policy) still navigates. The chevron button covers keyboard users, so the title is a plain div; a lone div toggle needs role="button" and tabindex="0".
    data-tc-category="…"row div around each switchWhich category the checkbox inside controls. The visible title is yours to change. The Essential row has no switch, only a badge.
    data-tc-element="switch"checkbox fieldGets the combo class is-on (together with its input, label, and knob) while the category is allowed.
    data-tc-element="accordion"row div, vendor divA collapsible box. The script sets data-tc-open and the combo class is-open on it.
    data-tc-element="details"div inside an accordionHidden while the accordion is closed.
    data-tc-element="chevron"icon inside the toggleGets is-open and rotates 180° while its accordion is open.
    data-tc-vendor="sample"vendor div inside the row detailsTemplate for the generated vendor cards; removed on the published site. Any other value marks a hand-written card that stays.
    data-tc-field="…"inside the vendor templatevendor-name, vendor-privacy (link), cookie (repeated per cookie), cookie-name, cookie-purpose, cookie-duration; empty on the per-row message.
    data-tc-variant="…"banner text, buttons, anythingMarks copy for one rule: opt-in, opt-out, or none. The paste keeps only the rules you selected, so an opt-in component has the GDPR text, Reject all, and Accept all, and an opt-out component has the CCPA text, Do not sell or share, and OK. By region keeps every version.
    If the paste does nothing

    Webflow reads a specific clipboard format and changes it from time to time. Copy as HTML embed is the fallback: paste it into a Code Embed element. It works immediately, but the result is not styleable in the Designer.

  4. Publish and test

    Publish to staging first and walk through this list in a private window with DevTools open.

    • The banner shows and the Network tab lists no tracker requests.
    • After Accept all, trackers load, a tc_consent cookie exists, and the Preferences button appears bottom-left.
    • Reload: no banner, trackers load straight away, Preferences button still there.
    • Open preferences from that button, expand a row and a vendor, then Reject all: the tracker cookies (_ga, _fbp, …) disappear from Application → Cookies and the page reloads with everything blocked.
    • On a phone-sized viewport the banner spans the width and the buttons stack.
Preferences