[GUIDE] How to style, change or disable the Blogger EU Cookie Notice

The notice looks like:
Here are some instructions on how to update the EU cookie notice.
Notice Style:
To change the style of the EU Cookie notice, add a <STYLE> tag in your template <HEAD> tag. For example, this code will position the Cookie notice at the bottom of the window, make it yellow with red text:
<style type='text/css' class='singleton-element'>
#cookieChoiceInfo {
bottom: 0;
top: auto;
}
#cookieChoiceInfo .cookie-choices-inner {
background-color:yellow;
}
#cookieChoiceInfo .cookie-choices-text {
color:red;
}
</style>
The CSS style names to use are:
#cookieChoiceInfo {...}
#cookieChoiceInfo .cookie-choices-inner {...}
#cookieChoiceInfo .cookie-choices-text {...}
#cookieChoiceInfo .cookie-choices-buttons {...}
#cookieChoiceInfo .cookie-choices-button {...}
Notice Text:
To change the text of the EU Cookie notice, add a SCRIPT tag in your template <HEAD> tag.
For example, this code will change the help button text:
<script type="text/javascript">
cookieOptions = {
learn: "See more here"
};
</script>
There are four elements you can change:
learn: The text of the “help” button
close: The text of the “ok” button
link: The URL of the page opened when the “help” button is clicked.
Disabling the Notice:
To tell the notice code not to insert the EU Notice, add this <SCRIPT> tag in your template <HEAD> tag:
<script type="text/javascript">
cookieChoices = {};
</script>
More information can be found at http://www.blogger.com/go/cookiechoices
Comments
Post a Comment