Consent
How Wake's consent banner, two-click embeds and consent records work.
Wake has a consent manager built in. It asks only when there is something to ask for, treats "Decline" exactly like "Accept" and keeps an anonymous record of every decision.
When the banner appears
By default the banner appears on every site (always: true in
settings/consent.yml), so visitors always see what the site counts and can
decide. With always: false it appears only when the site actually needs
consent up front:
- the statistics cookie is offered (
statistics: true), - marketing scripts are used (
marketing: true), - the site has its own categories, or
- level-1 statistics wait for consent (
tracking.level1: 'consent', the default).
Embedded videos and maps ask for themselves when someone clicks them (see below).
The footer link @wakeConsentLink ("Cookie settings") opens the detailed
settings at any time, so visitors can change or withdraw their choice.
Categories
| Category | What it unlocks |
|---|---|
| Necessary | the wake_consent cookie that stores the choice. Always active |
| Statistics | the wake_v cookie for level-2 statistics (returning visitors) |
| External media | all embeds (YouTube, Vimeo, maps, …) without a click |
| Marketing | your own scripts marked with data-wake-consent="marketing" |
| Your own | your own scripts marked with data-wake-consent="<id>", see below |
Visitors who choose Accept all agree to every category the banner shows, your own ones included. In the detailed settings every category except Necessary starts switched off.
Your own categories
Some scripts need a yes of their own, independent of Marketing: an analytics
service that sends data to the USA, a chat widget, a newsletter popup. Add a
category for each under Consent → Own categories in the panel, with an id
and, per language, a label and a description. Or write them into
settings/consent.yml:
categories:
- id: heycatch
texts:
en:
heycatch: HeyCatch analytics (USA)
heycatch_text: Counts visits on servers in the USA. Data is sent to HeyCatch.
de:
heycatch: HeyCatch-Statistik (USA)
heycatch_text: Zählt Besuche auf Servern in den USA. Dabei werden Daten an HeyCatch übertragen.
Then mark the scripts with the id:
<script type="text/plain" data-wake-consent="heycatch" src="https://example.com/heycatch.js"></script>
The rules:
- An id has 2 to 32 characters: lowercase letters, digits,
-and_, starting with a letter. It cannot benecessary,statistics,mediaormarketing, the name of one of the banner's own texts (title,accept, …) or end in_text. Wake ignores ids that break these rules, and duplicates. - Your categories appear after the built-in ones, in the order of the list.
- The label is
texts.<language>.<id>, the descriptiontexts.<language>.<id>_text. Without a label the banner shows the id. - With at least one category of your own, the banner appears even with
always: false. - Adding or removing a category raises the version, so visitors are asked again. Removing one also removes its texts.
Two-click embeds
::: embed https://www.youtube.com/watch?v=abc123
Caption of the video.
:::
Wake renders a placeholder that names the service and explains that data goes to it. Nothing is loaded from the service until the visitor clicks Load content. A checkbox Always allow YouTube remembers the choice for this service only. Visitors who agreed to External media see embeds directly.
Where a service offers a privacy-friendlier player, Wake uses it
(youtube-nocookie.com, Vimeo with dnt=1).
Recognised services: YouTube, Vimeo, Google Maps, OpenStreetMap, Spotify, SoundCloud, Instagram, X. Other addresses are embedded as "external content".
Your own scripts
Scripts in a theme or code injection run only after consent when you mark them:
<script type="text/plain" data-wake-consent="marketing" src="https://example.com/pixel.js"></script>
data-wake-consent takes any category the banner offers: statistics,
media, marketing or one of your own. The script
runs as soon as the visitor agrees, without reloading the page.
The list for your privacy policy
Wake writes a ready-made section for the privacy policy: Wake's statistics
(and whether they wait for consent), the cookies in use and every service
embedded anywhere in your content. It updates itself when you embed something
new or change a setting. Put it into the privacy page as a card, or into a
theme template with @wakeServices:
::: privacy-details
:::
The privacy policy that Wake creates during setup already contains it. It is a starting point, not legal advice.
The privacy link
The banner links the privacy policy. Under Consent in the panel you choose
which: the site's privacy policy (the page in legal.privacy, see
configuration), any other page, or
another address. A page is linked only once it is published, in the visitor's
language if it has a translation.
Records
Every decision is sent to public/hit.php and appended to
data/consent/{year}-{month}.log:
{"time":"2026-10-17T09:41:00+00:00","id":"3f9c…","categories":["necessary","statistics"],"action":"custom","version":2,"language":"de"}
The record contains a random consent id (also stored in the visitor's cookie), the time, the categories (only those the site knows, your own included), the language and the version of the banner texts. It contains no IP address and nothing else that identifies a person. That is enough to prove that a given consent was given with a given text (Art. 7 GDPR).
Versions
Changing the banner texts or the list of your own categories raises the
version in settings/consent.yml. Visitors
whose stored choice has an older version are asked again.
In the panel
Consent shows the decisions of the last 30 days, the agreement per category (your own ones included), the latest records and the embedded services. Administrators edit the banner and their own categories there, with a live preview per language.
Settings file
settings/consent.yml is written by the panel. All keys are optional:
version: 2
statistics: true # offer the level-2 statistics cookie
marketing: false
always: true # show the banner even if nothing needs consent (default)
position: bottom # bottom or center
privacy_page: '' # page for the banner's privacy link; '' = the site's privacy policy (legal.privacy)
privacy_url: '' # or any address; wins over privacy_page
categories: # your own categories, after the built-in ones
- id: heycatch
texts:
de:
title: Ihre Privatsphäre
accept: Alle akzeptieren
heycatch: HeyCatch-Statistik (USA) # label of your own category
heycatch_text: Zählt Besuche in den USA. # its description
Texts you leave out use Wake's defaults in English or German.
source: docs/concepts/consent.md