From b7c3b58072dd69d6a7026fae8a290d57456acaa6 Mon Sep 17 00:00:00 2001 From: Francis Cao Date: Thu, 30 Mar 2023 23:13:03 -0700 Subject: [PATCH] fix to page title collect --- tracker/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tracker/index.js b/tracker/index.js index 698dd09e..68ee282e 100644 --- a/tracker/index.js +++ b/tracker/index.js @@ -132,7 +132,7 @@ const observeTitle = () => { const callback = ([entry]) => { - title = entry.target.data; + title = entry.target.text; }; const observer = new MutationObserver(callback); @@ -140,6 +140,7 @@ observer.observe(document.querySelector('head > title'), { subtree: true, characterData: true, + childList: true, }); };