mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
Adding feature to use url params to temp or permanently disable umami
This commit is contained in:
parent
21f0ad2b78
commit
b91f6d206a
1 changed files with 5 additions and 1 deletions
|
|
@ -28,10 +28,14 @@ import { removeTrailingSlash } from '../lib/url';
|
|||
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
|
||||
}
|
||||
|
||||
if (getURLParameter('setlsdnt')) {
|
||||
localStorage.setItem('umami.disabled', 'true');
|
||||
}
|
||||
|
||||
const disableTracking =
|
||||
localStorage.getItem('umami.disabled') ||
|
||||
(dnt && doNotTrack()) ||
|
||||
getURLParameter("dnt") != null
|
||||
getURLParameter('dnt') != null
|
||||
(domains &&
|
||||
!domains
|
||||
.split(',')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue