WP DoNotTrack: user opt-out for your Cookie Law pleasure

It was long overdue, but I finally came around to releasing version 0.8 of WP DoNotTrack. The main feature to warrant the bump in the version-number, is the addition of conditional filtering based on user opt-out.
There is no opt-out UI in the plugin, but it hooks in to “Civic Cookie Control“, a JavaScript-based widget with a nice and customizable UI, which allows your customers to consent to cookies or to opt-out of them. When on WordPress, you can easily enable and configure Civic Cookie Control by installing the Cookie Control WordPress plugin.
If you’d prefer to do without Cookie Control, you can add your solution for users to opt in or out and set a cookie “dont_track_me” with value “1”, which will trigger conditional filtering as well. A very, very basic implementation could be to add something along these lines in the head-section of your site (in header.php of your template):

var r=confirm("Click \"OK\" for the full experience or \"Cancel\" to disallow 3rd party sites to store cookies on your computer.");
if (r==true) {
document.cookie="dont_track_me=0;";
} else {
document.cookie="dont_track_me=1;";
}

The other features of 0.8 from the Changelog:

  • new: “forced” mode now default
  • bugfix: re-introduced the bugfix for whitelist mode that was rollbacked in 0.7.2 (and a bug in that bugfix was the reason for 0.8.1, actually)
  • bugfix: conflict with prototype which caused wysiwyg editing of Wysija newsletter templates to break