Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed tracker.

Mike Cao801200c0bf99
diff --git a/src/tracker/index.js b/src/tracker/index.js
index e1c269734..16f714e45 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -6,9 +6,9 @@
document,
history,
} = window;
- const localStorage = location.href.startsWith('data:') ? undefined : window.localStorage
const { hostname, href } = location;
const { currentScript, referrer } = document;
+ const localStorage = href.startsWith('data:') ? undefined : window.localStorage;
if (!currentScript) return;
@@ -63,7 +63,7 @@
const getPayload = () => ({
website,
- hostname || 'none',
+ hostname,
screen,
language,
title: encode(title),