Skip to component content

A first-visit consent card with categories and services, a settings trigger, an embed placeholder and a policy table, composed from Card, Accordion, Switch, Button and Table.

Shown bottom-right until the visitor answers, without covering the page. Functional is always active; every other category with at least one service starts off. Accept all, Decline and Save choices carry equal weight. The preview also holds the two companions: the Cookie settings link in the footer reopens the card with the stored choices, and the video placeholder loads its embed once with Load content, or grants External media for the whole site with Always allow ticked. The choice is stored in a first-party cookie with a revision and a time stamp and asked again when a category or service changes.

Consent is a cookie consent banner you host yourself. It asks each visitor once which optional categories they allow, such as statistics, marketing or external media like videos and maps, and keeps everything optional switched off until they say yes. Sites describe their categories and services in one configuration; the same configuration renders the card, the settings dialog and the table on the cookie policy page, so the banner and the policy never disagree.

It runs on your own domain: the card is plain server-rendered Bootstrap markup and the small consent.js module stores the answer in a first-party cookie. No consent management platform, no script from another host and no request leaves the page before the visitor agrees. The Odoo and Astro adapters render it from their own settings and translations.

When to use it

  • Your site loads anything that is not strictly necessary: analytics such as Matomo, embedded videos, maps, social media posts or advertising tags.

  • You want separate choices per category instead of a single accept or reject, as the GDPR and the German TDDDG expect.

  • You need a cookie policy page that lists every service, provider, purpose and lifetime, kept in step with the banner.

What it takes care of

  • Optional categories start unchecked, and Decline is one click, as easy as Accept all.

  • The choice is stored with a revision and a time stamp and asked again when you add a category or service, or after twelve months.

  • Scripts, frames and images marked with data-consent-category load only after their category is granted; withdrawing consent removes their first-party cookies.

  • A footer link reopens the same card at any time, so visitors can change their mind.

Policy table

The same configuration as a table for the cookie policy page, one table per shown category.

Functional Always active

Needed for the site to work: the session, security against forged requests, the chosen language and colour mode.

Service Provider Purpose Cookies and storage
Site session This website Sign-in, form security, language and theme session_id Cookie, 7 days
frontend_lang Cookie, Session
moo_consent_catalog Cookie, 12 months
moo-website:1 Local storage, Until removed

Statistics

Anonymous counts of visits and pages, measured on our own server, so we know which content helps.

Service Provider Purpose Cookies and storage
Matomo This website (self-hosted) Visit and page statistics _pk_id.* Cookie, 13 months
_pk_ses.* Cookie, 30 minutes

External media

Videos and maps from other providers. They load from the provider's servers, which then receive your IP address.

Service Provider Purpose Cookies and storage
Video platform
Privacy policy
Example Video Ltd. Play embedded videos Provider cookies Cookie, Up to 6 months

Configuration

Each category has an id, a label, a description and its services. Each service names its provider and purpose and lists the cookies or storage it uses, with their lifetime. Only categories with at least one service are shown, and only functional is always active. The configuration's revision changes whenever a category or service is added or removed, which asks every visitor again.

Stored choice

The answer is saved in a first-party cookie, moo_consent by default, holding a format version, the revision, the time of the choice and one entry per optional category. Your server can read it too, for example to leave a statistics snippet out of the page entirely.

Loading scripts and embeds after consent

Mark a script as type="text/plain" with data-consent-category, or give a frame or image data-consent-src instead of src. The module activates them when the category is granted. Code can also ask directly with granted("statistics"), wait with whenGranted() or listen for the moo:consent:change event.

Accessibility

On the first visit the card appears without taking focus or blocking the page. Opened from the settings link, focus moves into the card and stays there until it closes, then returns to the link. Every switch is a labelled native checkbox, and the card follows reduced motion, dark mode and right-to-left layouts.

Key Action
Tab Moves between the category rows, switches, buttons and links. When the card is opened from the settings link, focus stays inside it.
Enter / Space Expands a category, toggles a switch or activates a button.
Esc Closes the card opened from the settings link without changes, once a choice exists.

The block follows the common reading of the GDPR, the German TDDDG §25 and the CJEU Planet49 judgment: no pre-ticked boxes, refusing as easy as accepting, and a way to withdraw at any time. It is not legal advice; which services need consent on your site, and how your privacy policy describes them, is for you and your advisers to decide.

Settings

Theme
Choose how Moo UI looks on this device.
Sidebar
Choose how the sidebar sits on the page.
Theme Builder
Tune catalog tokens and chart colors for this browser.
Base color
Theme color
Chart color
Heading font
Body font
Radius
Direction
Choose the reading direction. RTL flips the layout live.
Reset

Restore the default appearance.