CookieNoticeJS is a very simple and small (→ 2 kB gzip) vanilla JS script with multi language support for GDPR/DSGVO transparency and notification purposes that provides an easy way to show a cookie notice on your website.
Available via npm
npm install cookie-noticenpm test
To use in your project There are plenty ways for integration:
When installed via npm, include in any project by using path below:
For usage with Angular2+ add line below in "scripts" section in angular-cli.json:
When cloned directly from gitHub use path below:
You will get a dismissable banner on the bottom of your pages showing a default cookie audit like the following:
Check my website for a DEMO. Depending on the visitor browser language one of the preloaded translations will be shown. At the moment CookieNoticeJS supports EN, IT, DE and FR. If you want to contribute with an extra language do not hesitate to open an issue or a PR.
CookieNoticeJS has been successfully tested on IE9+, Chrome, Firefox and Safari.
For the most of you including the script should be enough but CookieNoticeJS comes with many customization options. Let's see an example: