mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 20:15:41 +01:00
Update index.js
trigger only after document readstate change to complete
This commit is contained in:
parent
cb790fd466
commit
72bc3299e2
1 changed files with 8 additions and 6 deletions
|
|
@ -223,6 +223,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
|
if(document.readyState==='complete'){
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
track();
|
track();
|
||||||
handlePathChanges();
|
handlePathChanges();
|
||||||
|
|
@ -230,6 +231,7 @@
|
||||||
handleClicks();
|
handleClicks();
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const track = (obj, data) => {
|
const track = (obj, data) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue