mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Added check to disable tracking.
This commit is contained in:
parent
b116fbf4cb
commit
e0c2354169
3 changed files with 68 additions and 61 deletions
|
|
@ -6,6 +6,7 @@ import { removeTrailingSlash } from '../lib/url';
|
|||
screen: { width, height },
|
||||
navigator: { language },
|
||||
location: { hostname, pathname, search },
|
||||
localStorage,
|
||||
sessionStorage,
|
||||
document,
|
||||
history,
|
||||
|
|
@ -24,6 +25,7 @@ import { removeTrailingSlash } from '../lib/url';
|
|||
const domains = attr('data-domains');
|
||||
|
||||
const disableTracking =
|
||||
localStorage.getItem('umami.disabled') ||
|
||||
(dnt && doNotTrack()) ||
|
||||
(domains &&
|
||||
!domains
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue