mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
Fix tracker
This commit is contained in:
parent
d19bcbabe0
commit
d6d1c68e6d
@ -55,9 +55,6 @@ import { removeTrailingSlash } from '../lib/url';
|
|||||||
pageView();
|
pageView();
|
||||||
};
|
};
|
||||||
|
|
||||||
history.pushState = hook(history, 'pushState', handlePush);
|
|
||||||
history.replaceState = hook(history, 'replaceState', handlePush);
|
|
||||||
|
|
||||||
/* Handle events */
|
/* Handle events */
|
||||||
|
|
||||||
const removeEvents = () => {
|
const removeEvents = () => {
|
||||||
@ -84,7 +81,7 @@ import { removeTrailingSlash } from '../lib/url';
|
|||||||
if (!window.umamiTrack) {
|
if (!window.umamiTrack) {
|
||||||
window.umamiTrack = (type, params, id) => {
|
window.umamiTrack = (type, params, id) => {
|
||||||
if (!id) {
|
if (!id) {
|
||||||
id = website
|
id = website;
|
||||||
}
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
url: currentUrl,
|
url: currentUrl,
|
||||||
@ -111,6 +108,8 @@ import { removeTrailingSlash } from '../lib/url';
|
|||||||
/* Start */
|
/* Start */
|
||||||
const skipAuto = new URL(script.src).search.includes('auto=false');
|
const skipAuto = new URL(script.src).search.includes('auto=false');
|
||||||
if (!skipAuto) {
|
if (!skipAuto) {
|
||||||
|
history.pushState = hook(history, 'pushState', handlePush);
|
||||||
|
history.replaceState = hook(history, 'replaceState', handlePush);
|
||||||
pageView();
|
pageView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user