K.R.C. LogoThe Book of Kara

Do Not Track Support

Published 28 June 2017

Hi! You've stumbled upon a blog post by a guy named Ryan. I'm not that guy anymore, but I've left his posts around because cool URIs don't change and to remind me how much I've learned and grown over time.

Ryan was a well-meaning but naïve and priviledged person. His views don't necessarily represent the views of anyone.

Came upon a neat EFF page describing privacy best practices for working with Privacy Badger and similar tools, so I figured it's no big deal to add it.

The new page is here.

I don't use any fancy tracking, but it's pretty simple to comply with Google analytics. You have three options.

The easiest way is to simply not load GA at all:

if (!navigator.doNotTrack) {
// include GA code snippet
}

If you've got deeper GA integration and don't want to lose the ga code, Google's Docs on Cookies and User Identification also allow you to remove cookie storage:

var gaOpts = {};
if (navigator.doNotTrack) {
  gaOpts.storage = "none";
}
ga("create", gaAccountId, gaOpts);

And lastly, you can enable GA Opt-Out:

window['ga-disable-' + gaAccountId] = !!navigator.doNotTrack;

It's a good time to show your users you care about their privacy, and respecting Do Not Trakc is a great way to do it.

K.R.C. LogoPrevious: HousekeepingNext: Winter Roads