cookieyesno
Easy to use GDPR-complient cookie-banner
Usage
import CookieYesNo from 'cookieyesno';
const cyn = new CookieYesNo({
text: 'This website uses cookies. You can select below which cookies will be stored on your device.',
cookiePolicy: '<LINK TO YOUR COOKIE POLICY>',
categories: {
required: {
allowed: true,
description: 'These cookies are necessary for the website to function properly.',
changeable: false
},
Analytics: {
allowed: false,
description: 'These cookies are used to analyze the user\'s behavior.'
}
}
});
cyn.onChange((settings) => {
});
cyn.onAccept('analytics', () => {
});
cyn.onReject('analytics', () => {
});
cyn.getSettings();
cyn.reviewSettings();