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) {
} else {

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

2 thoughts on “WP DoNotTrack: user opt-out for your Cookie Law pleasure

  1. MarketingMaster


    I need some help. How can I hook WP DoNotTrack with Cookie Control? Can you help me with this?

    Thx, BR

    1. frank Post author

      It should work pretty much out of the box; it does a check for the cookie control cookie


      and if the cookie is there, it stops javascript from being added.

      Now off course, if the cookie control cookie’s name changed, this might not work any more. If you can provide me with your site’s URL (here of via the contact form), I can have a look at what is (not) happening?


Leave a Reply to MarketingMaster Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.