@statsig/web-analytics 3.25.3 → 3.25.4
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/package.json +3 -3
- package/src/utils/eventUtils.js +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@statsig/web-analytics",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.4",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"homepage": "https://github.com/statsig-io/js-client-monorepo",
|
|
6
6
|
"repository": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"directory": "packages/web-analytics"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@statsig/client-core": "3.25.
|
|
13
|
-
"@statsig/js-client": "3.25.
|
|
12
|
+
"@statsig/client-core": "3.25.4",
|
|
13
|
+
"@statsig/js-client": "3.25.4",
|
|
14
14
|
"web-vitals": "5.0.3"
|
|
15
15
|
},
|
|
16
16
|
"jsdelivr": "./build/statsig-web-analytics.min.js",
|
package/src/utils/eventUtils.js
CHANGED
|
@@ -107,9 +107,15 @@ function _isOutboundLink(metadata) {
|
|
|
107
107
|
}
|
|
108
108
|
const href = metadata['href'];
|
|
109
109
|
if (href) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
try {
|
|
111
|
+
const currentUrl = (0, commonUtils_1._getSafeUrl)();
|
|
112
|
+
const linkUrl = new URL(href);
|
|
113
|
+
return currentUrl.host !== linkUrl.host;
|
|
114
|
+
}
|
|
115
|
+
catch (_b) {
|
|
116
|
+
// Invalid URL, treat as non-outbound
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
113
119
|
}
|
|
114
120
|
return false;
|
|
115
121
|
}
|