cookie-setting
v2.8.3
Published
GDPR Cookie Setting ============= Inspired by [passatgt](https://github.com/passatgt/gdpr-cookie-notice)
Downloads
5
Readme
GDPR Cookie Setting
Inspired by passatgt
This is a javascript solution to show a gdpr compliant cookie notice on your website.
Demo
Check this site for a quick demo: Link
How it works?
Include the scripts.js and style.css files on your site from the dist folder. Init the script with the following config file:
<head>
...
<link
rel="stylesheet"
type="text/css"
href="https://unpkg.com/cookie-setting@latest/dist/style.css"
/>
</head>
<body>
...
<script
src="https://unpkg.com/cookie-setting@latest/dist/script.js"
type="text/javascript"
></script>
<script>
gdprCookieNotice({
locale: 'en', // language ("en", "de")
timeout: 500, // Time until the cookie bar appears
expiration: 30, // expiration date for accepting cookie, it'll show popup again when it's expire
domain: '.yoursite.com', // specify your web domain prefix with dot
colorPrimary: '#ff0000', // change primary color (used in button and radio)
colorSecondary: '#000000', // change secondary color (used in link)
policyLink: "https://www.20scoops.com" // cookie policy link,
analytics: "UA-MOCK"
});
</script>
</body>