Piwik neither respects "Do-not-track" nor explicit opt-out

Hi,

we’ve successfully set-up Piwik, but it neither respects the browser’s “Do-not-track” setting nor explicit opt-out by the user. First of all: what are we using?

We initialize the piwik using the following settings:

 _paq.push(["setTrackerUrl", trackingUrl]);
 _paq.push(["setDomains", domains]);
 _paq.push(["enableLinkTracking"]);
 _paq.push(["setSiteId", siteId]);

The variables trackingUrl, domains, and siteId contain strings required for identifying our application.
We are intentionally not using

_paq.push(['trackPageView']);

because tracking page views is handled by angulartics.

We enabled “Do-not-track” support in Piwik’s privacy settings and use the iframe to allow users to out out from being tracked. As you can see from the message, the code in the iframe also correctly detects that my browser has “Do-not-track” enabled.

You are not being tracked since your browser is reporting that you do not want to. This is a setting of your browser so you won’t be able to opt-in until you disable the ‘Do Not Track’ feature.
(this is displayed in the opt-out iframe)

Unfortunately, piwik.js (triggered by angulartics) still sends data to our Piwik server on each page change. See the screenshot below for the request (had to remove all links and references to our application).

The same happens when the user has “do-not-track” disabled, but actively opted out, i.e. despite actively opting out, requests are sent to the Piwik server.

On top of that, these request do not seem to be stored in the tracking database. While this is actually good because these users do not want to be tracked, it is even more confusing. The requests should not be sent in the first place.

Has anyone of you observed such an behavior before? I’m quite puzzled and have no idea what causes the behavior.

Best regards,

Thylossus

Hello,

Requests are sent to the Piwik tracking API which decides whether to drop them off if DoNotTrack is enabled. So it is expected the requests are sent, but they should not be tracked and not appear in your reports.

Hello Matthieu,

thank you for your response which clarifies it for me. According to your answer everything in our setup works as designed.

Best regards,

Thylossus