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.
Cookie notice at the bottom of the page
Cookie notice at the top of the page
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 out my blog for a DEMO. Depending on the visitor browser language one of the preloaded translations will be shown. At the moment CookieNoticeJS supports following languages out of the box:
- IT (Italiano)
- EN (English)
- FR (Français)
- PT (Português)
- ES (Español)
- NL (Nederlands)
- DE (Deutsch)
- PL (Polski)
If you want to contribute with an extra language or find translation issues 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: