Skip to content

Piwik warning: “ignore DNT” is bull$#!t!

I’m currently (still) in the process of migrating my sites from the old 1&1 server to a new EUserv server. Today I migrated Piwik, which is actually about the biggest site of all (that’s right, the quite moderate traffic stats just take up more space than the actual site contents, although this is old news…). I’m migrating slowly because there’s no hurry since I’ll be keeping the old server for still a while I guess, and because I like to make sure that everything works fine.

So of course, after moving Piwik I tried visiting around to check if it worked fine. And it didn’t. Or rather, not completely: on this blog, I could see visitors, but on some other sites I track, I couldn’t. Since they have a lower traffic, I decided to go around visiting myself and see if I would see me: still nothing. I first thought that it might be due to that anti-block code I had recently implemented, and which I indeed forgot to migrate properly (the Apache “SetHandler” part). After fixing it, still the issue.

Long story short, it took me a while to realize that I couldn’t see myself on the higher traffic sites either. But why would I not see myself? The only thing I could think of was maybe I configured Do Not Track (DNT) and forgot about it. Yet I had configured Piwik to ignore DNT. But still, I applied the quick Apache config trick to remove the DNT header at the HTTPd server level (enable mod_headers and then add somewhere at the end of the Apache config file RequestHeader unset DNT)… and it worked! I could now see myself. So, the logical conclusion of this is that the Piwik option to ignore DNT (in Settings → Privacy → Support Do Not Track preference) is broken, either intentionally or not. If you don’t want to support DNT, you should then kill it at the HTTPd server level.

Posted in web development.

Tagged with .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA