Fixed page titles in tracker.
This commit is contained in:
parent
a2245efa2d
commit
226c6e313f
|
@ -44,7 +44,7 @@
|
||||||
hostname,
|
hostname,
|
||||||
screen,
|
screen,
|
||||||
language,
|
language,
|
||||||
title: encodeURIComponent(title),
|
title: title ? encodeURIComponent(title) : undefined,
|
||||||
url: encodeURI(currentUrl),
|
url: encodeURI(currentUrl),
|
||||||
referrer: encodeURI(currentRef),
|
referrer: encodeURI(currentRef),
|
||||||
});
|
});
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
const handleTitleChanges = () => {
|
const handleTitleChanges = () => {
|
||||||
const observer = new MutationObserver(([entry]) => {
|
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');
|
const node = document.querySelector('head > title');
|
||||||
|
|
Loading…
Reference in New Issue