mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
Update index.js
better solution from @mikecao, it's not dependent on script name
This commit is contained in:
parent
4fb9150631
commit
36119f4cb4
1 changed files with 1 additions and 1 deletions
|
|
@ -17,7 +17,7 @@ import { post, hook, doNotTrack } from '../lib/web';
|
|||
if (!script || (__DNT__ && doNotTrack())) return;
|
||||
|
||||
const website = script.getAttribute('data-website-id');
|
||||
const hostUrl = new URL(script.src).href.replace(/\/umami\.js$/,'');
|
||||
const hostUrl = new URL(script.src).href.split('/').slice(0, -1).join('/');
|
||||
const screen = `${width}x${height}`;
|
||||
const listeners = [];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue