GDPR Cookie Law – GDPR Cookie Compliance Plugin example – Custom hyperlinks
For the best user experience on the demo site, the cookies are automatically deleted. This way you can always see the notification toolbar.
Custom hyperlinks
Example code
<link rel="stylesheet" href="http://your-domain.com/gdpr-cookie-law/css/gdpr-cookie-law.min.css">
<script src="http://your-domain.com/gdpr-cookie-law/js/jquery-3.3.1.min.js"></script>
<script src="http://your-domain.com/gdpr-cookie-law/js/gdpr-cookie-law.min.js"></script>
<script>
$(document).ready(function () {
$(document).gdprCookieLaw({
desc: 'We use {{myCustomAnchor1}} to ensure that we give you the best experience on our website. By continuing to use our site, you accept our {{myCustomAnchor2}}.',
moreLinkStatus: false,
customAnchors: [
{
id: 'myCustomAnchor1',
href: 'http://your-domain.com/cookies',
title: 'About cookies',
target: '_blank',
text: 'cookies'
},
{
id: 'myCustomAnchor2',
href: 'http://your-domain.com/privacy-policy',
title: 'Cookie policy',
target: '_blank',
text: 'cookie policy'
}
]
});
});
</script>
Related options
Peoprty | Possible Values | Default Value | Description |
---|---|---|---|
desc | 'Any text what you want' | 'We use cookies to ensure that we give you the best experience on our website. By continuing to use our site, you accept our cookie policy.' | The description of the box. |
moreLinkStatus | true, false | true | The status of the 'More information' link. If the value is true, the 'More information' link appears. If the value is false, the 'More information' link does not appear. |
customAnchors | e.g. [ { id: 'cookies', href: 'http://your-domain.com/cookies', title: 'About cookies', target: '_blank', text: 'cookies' }, { id: 'cookiePolicy', href: 'http://your-domain.com/privacy-policy', title: 'Cookie policy', target: '_blank', text: 'cookie policy' } ] | null | You can add custom anchors to the description. E.g. desc: 'We use {{cookies}} to ensure that we give you the best experience on our website. By continuing to use our site, you accept our {{cookiePolicy}}.' |