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 page titles in tracker.

Mike Cao226c6e313fe4
diff --git a/src/tracker/index.js b/src/tracker/index.js
index 606da9257..87e79ef68 100644
--- a/src/tracker/index.js
+++ b/src/tracker/index.js
@@ -44,7 +44,7 @@
hostname,
screen,
language,
- title: encodeURIComponent(title),
+ title: title ? encodeURIComponent(title) : undefined,
url: encodeURI(currentUrl),
referrer: encodeURI(currentRef),
});
@@ -79,7 +79,7 @@
const handleTitleChanges = () => {
const observer = new MutationObserver(([entry]) => {
- title = entry && entry.target ? entry.target.text : undefined;
+ title = entry && entry.target ? entry.target.data : undefined;
});
const node = document.querySelector('head > title');