Oli Gentle Consent
No? OK, cool.
The consent the law asks for, asked gently: one small question, and “no” is a normal answer. The visitor who says no keeps a page that works, with plain links, and is never asked again.
A plugin for Grav. Coming soon on GitHub (AGPL-3.0).
What the visitor sees
Until they agree, a video, a map or a player is a card with a plain link, and nothing is sent to the provider. Once they agree, the cards become the real content, at once.
What it does
- One choice for the whole site, kept in the visitor’s browser only.
- It finds the services by itself. Every page the site sends adds its services (YouTube, Vimeo, Spotify, Google Maps…) to the list of the site, and a scan visits the whole sitemap. The banner and the privacy policy show the same list: nobody keeps it by hand.
- A new service asks again, for that one only. Consent given for YouTube never sends data to another provider.
- No means no, and stays no: the visitor is not asked again.
- A switch for the privacy policy, to change one’s mind at any time.
- A small JavaScript API, so other plugins can wait for the visitor’s choice too.
In a page
<div class="embed-slot" data-embed-src="https://www.youtube-nocookie.com/embed/ID">
<a class="embed-card" href="https://www.youtube.com/watch?v=ID">Watch on YouTube</a>
</div>
In the privacy policy: [consent-sources /] (the list of the services) and [consent-switch /] (the visitor’s choice).
Consent.granted('embeds') // true once the visitor agreed
Consent.whenGranted('embeds', fn) // fn now if agreed, else as soon as they agree
document.addEventListener('consent:change', (e) => e.detail)
Practising what it preaches
This page sets no cookie, runs no script and loads nothing from another server. You can see the plugin at work on van-helden.net.