Cookie Consent Warning mandatory in Europe

Cookie Consent Warning mandatory in Europe

by Rolf Cper -
Number of replies: 3

Hallo
Where in Moodle-code/feature can I put Javascript for a Consent-popup/warning to use Cookies (Mandatory by European Law)?
Preferably, the temporary popup should only show up once per user-visit/ new-contact or only on frontpage (or loginpage).
Google AdSense offers a Javascript that will inform visitors about the European law on CookieConsent.
(See: https://www.cookiechoices.org/)
I have implemented this by copying code (as admin) into Moodle: Site Administration > Appearance > Additional Html > Within Head textarea.
My question: how much of these javascript referrals (or inline Javascript) does Moodle technically allow here and will it interfere with Moodle-Javascript?

Regards, RGES
www cper org

Average of ratings: -
In reply to Rolf Cper

Re: Cookie Consent Warning mandatory in Europe

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You don't need JavaScript. Use this admin setting: https://docs.moodle.org/28/en/Site_policies#Site_policy_URL

In reply to Tim Hunt

Re: Cookie Consent Warning mandatory in Europe

by Matt Bury -
Picture of Plugin developers

Yes, Moodle follows the principles of "informed consent" well enough. Users just need to see the informed consent before any cookies are saved to users' caches, i.e. before they log in.

Adding Javascript (JS) from Google's servers is likely to do the opposite to what the EU are trying to achieve with their directive; they want to raise awareness of web surveillance and reduce the amount of it, rather than push yet more data, i.e. users' IP addresses and HTTP headers as well as whatever JS surveillance code is running alongside now or whatever they might surreptitiously add later to the cookie consent message getting pushed to Google's servers.

Also, Google's cookie consent won't work if users have JS blockers installed in their browsers (increasingly common these days since the vast majority of security threats are JS-based) even if they white-list your Moodle's domain, thereby defeating informed consent.

tl;dr - Using Google's JS consent may not comply with the EU directive.

I hope this helps! smile

In reply to Matt Bury

Re: Cookie Consent Warning mandatory in Europe

by Rolf Cper -

Hallo Tim and Matt,

Thank you for your answers.

Best regards,

Rges