mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Refactor do not track code.
This commit is contained in:
parent
fd0c22c09d
commit
0ba7676e97
3 changed files with 21 additions and 24 deletions
|
|
@ -13,7 +13,7 @@ import { post, hook, doNotTrack } from '../lib/web';
|
|||
|
||||
const script = document.querySelector('script[data-website-id]');
|
||||
|
||||
if (!script || doNotTrack()) return;
|
||||
if (!script || (__DNT__ && doNotTrack())) return;
|
||||
|
||||
const website = script.getAttribute('data-website-id');
|
||||
const hostUrl = new URL(script.src).origin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue