Added check to disable tracking.

This commit is contained in:
Mike Cao committed 2020-11-01 22:01:30 -08:00
1 parent b116fbf4cb
commit e0c2354169
3 files changed
+68 -61

No files matched your search

+2
View File
@@ -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