3 ms·
There are some nice examples in that post. One other example would be to respect the DoNotTrack setting of your browser. You don't need to load any tracking scr
by FrontAid 6y ago
There are some nice examples in that post. One other example would be to respect the DoNotTrack setting of your browser. You don't need to load any tracking scripts if DNT is enabled. That saves bandwidth and has a small effect on your page's loading times.
We recently blogged about that on the example of Matomo (Google Analytics alternative). The main part is the following code:
if (navigator.doNotTrack !== '1') { /* load script */ }
Here is the link if you are interested in the details: https://frontaid.io/blog/matomo-dnt-do-not-track/ https://frontaid.io/blog/matomo-dnt-do-not-track/
- madeofpalk 6y agoIsn't DNT deprecated and just not supported in browsers any more?
- FrontAid 6y ago> Isn't DNT deprecated [...]? No https://www.w3.org/TR/tracking-dnt/ https://www.w3.org/TR/tracking-dnt/ The problem with DNT is not its specification but that the largest chunk of the industry does not adhere to it. Instead they nag their users with annoying cookie overlays. > Isn't DNT [...] just not supported in browsers any more? It is supported by all common browsers except Safari: https://caniuse.com/do-not-track https://caniuse.com/do-not-track