mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05: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,12 +223,14 @@
|
|||
};
|
||||
|
||||
const init = () => {
|
||||
if (!initialized) {
|
||||
track();
|
||||
handlePathChanges();
|
||||
handleTitleChanges();
|
||||
handleClicks();
|
||||
initialized = true;
|
||||
if(document.readyState==='complete'){
|
||||
if (!initialized) {
|
||||
track();
|
||||
handlePathChanges();
|
||||
handleTitleChanges();
|
||||
handleClicks();
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue