Cookie Notice
Function
</ head>
<!-- Add the COOKIE CONSENT css -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
</ body>
<!-- Add the COOKIE CONSENT dependency script file -->
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script>
// initialize cookieconsent & define options
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#ebe5ca", // Background color for popup card
"text": "#000000" // Main text color for message
},
"button": {
"background": "#a09e91", // Background color for button (use "transparent" if you use the "wire" theme below. "
"text": "#fcf8f2", // Button text color
//border: "#a09e91" // Remove the first "//" if you plan on using the wire theme below
}
},
"theme": "block", // Theme options: "edgeless", "block", "classic", "wire"
"position": "bottom-right", // Positions options: "bottom-right", "bottom-left", "top", "bottom"
"static": false, // Set to "true" only if you choose "top" for the position which will push your content down instead of covering it.
"content": {
// Main message text on the cookie popup
"message": "This website uses cookies to ensure you get the best experience on our website.",
// Button text to accept
"dismiss": "Got it!",
// Button Link to your cookie policy or remove this line if you want it to go to: https://www.cookiesandyou.com/ (info site about cookies for your visitors)
"href": "https://yoursite.com/cookie-policy"
}
});
</script>
HTML/Embed
<!-- Add the COOKIE CONSENT css -->
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
Only tabs with a " " have code.
<!-- Add the COOKIE CONSENT dependency script file -->
<script src="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.js" data-cfasync="false"></script>
<script>
// initialize cookieconsent & define options
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#ebe5ca", // Background color for popup card
"text": "#000000" // Main text color for message
},
"button": {
"background": "#a09e91", // Background color for button (use "transparent" if you use the "wire" theme below. "
"text": "#fcf8f2", // Button text color
//border: "#a09e91" // Remove the first "//" if you plan on using the wire theme below
}
},
"theme": "block", // Theme options: "edgeless", "block", "classic", "wire"
"position": "bottom-right", // Positions options: "bottom-right", "bottom-left", "top", "bottom"
"static": false, // Set to "true" only if you choose "top" for the position which will push your content down instead of covering it.
"content": {
// Main message text on the cookie popup
"message": "This website uses cookies to ensure you get the best experience on our website.",
// Button text to accept
"dismiss": "Got it!",
// Button Link to your cookie policy or remove this line if you want it to go to: https://www.cookiesandyou.com/ (info site about cookies for your visitors)
"href": "https://yoursite.com/cookie-policy"
}
});
</script>
Only tabs with a " " have code.
Only tabs with a " " have code.
Only tabs with a " " have code.
If you have already pasted this code into your project then you can skip this. If you haven't, and it's your first time using CodeCrumbs, then copy this code and navigate to your sites global settings > Custom Code tab > paste it into the <head> (first custom code block). It just needs to exist once.
How to use:
Unlock more with PRO
Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!
Upgrade to Pro
Unlock more with PRO
Want to learn how to use this Crumb? Unlock detailed documentation, video tutorials, comments & support!
Upgrade to Pro
Tutorial Coming Soon!
Check Browser Support
Interactive Table
Contributor
CodeCrumbs Team
Short Description:
Cookie consent notice for your website visitors by Osano. Super easy to use & looks nice too.
Extra Info:
No extra info.
Clone Project
Documentation
Author:
Osano
Status:
Deprecated
New
Updated
This crumb is no longer being supported.
Latest Version:
Tags:
More related crumbs..
Want to contribute to the community?
Tell us what code you're working with. We would love to see it and possibly add it to the library.