We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39ef1ef commit 4fdf0d1Copy full SHA for 4fdf0d1
packages/gatsby-plugin-google-analytics/src/gatsby-ssr.js
@@ -78,7 +78,7 @@ export const onRenderBody = (
78
if(${
79
typeof pluginOptions.respectDNT !== `undefined` &&
80
pluginOptions.respectDNT == true
81
- ? `!(navigator.doNotTrack == "1" || window.doNotTrack == "1")`
+ ? `!(parseInt(navigator.doNotTrack) === 1 || parseInt(window.doNotTrack) === 1 || parseInt(navigator.msDoNotTrack) === 1 || navigator.doNotTrack === "yes")`
82
: `true`
83
}) {
84
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
0 commit comments