Alex-D/Cookies-EU-banner

Chrome 60 without DNT is identified as "to track"

agross opened this issue · 3 comments

Chrome 60, I disabled DNT in settings. this.isToTrack() returns undefined which is then negated to true.

isToTrack: function () {
      var dnt = navigator.doNotTrack || navigator.msDoNotTrack || window.doNotTrack; // dnt === undefined
      return (dnt !== null) ? (dnt && dnt !== 'yes' && dnt !== 1 && dnt !== '1') : true; // dnt && dnt !== 'yes' && dnt !== 1 && dnt !== '1' === undefined
    },

I tested a bit more with Chrome and Edge:

In Chrome dnt === undefined, hence (dnt !== null) === true .

In Edge, dnt === null, hence (dnt !== null) === false.

Should be fixed in 1.2.9.

Thank you!