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

Websites have been popping up with these messages for what feels like years now. If you're anything like me you pretty much always ignore the cookie messages. If you don't know what they are they track how you interact with the website so that they can "better serve" you. What this means in reality is that you take a passing interest in forks and toasters and visit a website, then before you know it every advert on every website is a forks and toasters related advert. Clever or intrusive and presumptuous? your call.

Recently Blogger introduced support for the European Union 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:


  msg: The main message of the notice
  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

Popular posts from this blog

The Sims 4" Walkthrough and Guide to Exploring Space

How to Play Emulate Old Pokemon Games on Your Android Phone

[1-5] of 53 Ultimate 90s Toys That Every 90s Kid Remembers