@wxt-dev/analytics 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.mjs +6 -4
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -37,7 +37,8 @@ function createBackgroundAnalytics(config) {
|
|
|
37
37
|
language: navigator.language,
|
|
38
38
|
referrer: void 0,
|
|
39
39
|
screen: void 0,
|
|
40
|
-
url: location.href
|
|
40
|
+
url: location.href,
|
|
41
|
+
title: void 0
|
|
41
42
|
}) => {
|
|
42
43
|
const platform = await platformInfo;
|
|
43
44
|
return {
|
|
@@ -90,9 +91,9 @@ function createBackgroundAnalytics(config) {
|
|
|
90
91
|
const event = {
|
|
91
92
|
...baseEvent,
|
|
92
93
|
page: {
|
|
93
|
-
url: globalThis.location?.href,
|
|
94
|
+
url: forwardMeta?.url ?? globalThis.location?.href,
|
|
94
95
|
location: location2,
|
|
95
|
-
title: globalThis.document?.title
|
|
96
|
+
title: forwardMeta?.title ?? globalThis.document?.title
|
|
96
97
|
}
|
|
97
98
|
};
|
|
98
99
|
if (config?.debug)
|
|
@@ -148,7 +149,8 @@ function createFrontendAnalytics(config) {
|
|
|
148
149
|
language: navigator.language,
|
|
149
150
|
referrer: globalThis.document?.referrer || void 0,
|
|
150
151
|
screen: globalThis.window ? `${globalThis.window.screen.width}x${globalThis.window.screen.height}` : void 0,
|
|
151
|
-
url: location.href
|
|
152
|
+
url: location.href,
|
|
153
|
+
title: document.title || void 0
|
|
152
154
|
});
|
|
153
155
|
const methodForwarder = (fn) => (...args) => {
|
|
154
156
|
if (config?.debug) {
|