drupal / mutamad_privacy
Nothing from another site reaches a Mutamad visitor before they agree: a cookie notice, and embedded videos, maps and other third-party content blocked until the visitor consents, with Klaro!. Aligned to the PDPL.
Package info
git.drupalcode.org/project/mutamad_privacy.git
Type:drupal-recipe
pkg:composer/drupal/mutamad_privacy
Requires
- drupal/core: ~11.4.0
- drupal/klaro: ^3.1
- drupal/mutamad_roles: ~1.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-16 05:59:12 UTC
README
Mutamad Privacy
Nothing from another site reaches a visitor before they agree. A cookie
notice at the bottom of the page, and every embedded video, map or social
post blocked behind a "load this content" notice until the visitor consents
to that service, with Klaro!, the
consent manager Drupal CMS uses. A drupal-recipe, applied by
mutamad_starter.
Aligned to the PDPL.
Built and maintained by iSpectra.
Why
An embedded YouTube video loads YouTube's player, Google's advertising scripts and their cookies the moment the page opens: personal data leaves for a third party before the visitor has agreed to anything. The player's own markup also fails WCAG 2.1 AA checks that Mutamad's pages pass.
What it sets up
- Klaro!'s catalogue of services — YouTube, Vimeo, Google Maps, the social networks, analytics — each off until the visitor agrees. Only the site's session cookie and Klaro's record of the choice are required. YouTube, Vimeo and Google Maps are managed, so they are blocked until consent; analytics and advertising are not used by Mutamad and stay off, so the notice does not list them.
- Third-party content is blocked when the page is built: in fields (a video shows its thumbnail, served by the site, and a "Yes (this time)" button), in attached scripts, and in the page's HTML (an iframe pasted into body text).
- A cookie notice at the bottom of the page — Accept, Decline, Customize — as DGA's Cookies Banner Template has one. A choice is kept for a year, then asked again.
- The public site only. The admin side — administration pages, content
and media forms, the Canvas editor, the login page — shows no notice, and
keeps every outside service blocked: an editor's preview of an embedded
video sends nothing to its provider (Klaro's
exclude_urls). - Accessibility (WCAG 2.1 AA): the notice does not take the keyboard
focus when a page opens, so "Skip to main content" stays the first stop,
and has no title, which Klaro writes as a second
h1. No "Powered by Klaro!". - Visitors give or refuse consent; the site administrator manages the services and the texts.
- Klaro's library is served by the site (
drupal/klaro_js), never from a CDN, which the Content Security Policy blocks.
Not Drupal CMS's privacy recipe itself: it applies
drupal_cms_content_type_base, which would replace Mutamad's content model.
The Mutamad theme setup
puts a Privacy settings link in the footer, where a visitor changes or
withdraws their consent: Klaro opens on any link to #klaro. The privacy
policy link points at the home page until the site has its privacy policy
page.
Content Security Policy
Klaro 3.1.1 passes empty event handlers to its library, which compiles them
with new Function(); a policy without 'unsafe-eval' — Mutamad's — stops
the consent manager. The
Mutamad project template
applies the fix from
#3607716 until it is
released.
Requirements
Mutamad Roles, which the recipe applies first; Klaro and its library
(drupal/klaro_js), through Composer.
Apply it to an existing site
drush recipe ../recipes/mutamad_privacy
License
GPL-2.0-or-later.
Maintainers
Built and maintained by iSpectra (on drupal.org).
