@nexly/web 0.15.1 → 0.15.3
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/browser-meta.d.ts.map +1 -1
- package/dist/browser-meta.js +14 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-meta.d.ts","sourceRoot":"","sources":["../src/browser-meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"browser-meta.d.ts","sourceRoot":"","sources":["../src/browser-meta.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkBH,4EAA4E;AAC5E,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4E5D;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgB1D;AAED,8DAA8D;AAC9D,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE5D"}
|
package/dist/browser-meta.js
CHANGED
|
@@ -39,6 +39,14 @@ export function collectSessionMeta() {
|
|
|
39
39
|
if (ref) {
|
|
40
40
|
out.referrer = ref;
|
|
41
41
|
}
|
|
42
|
+
// Session-level landing URL. The server parses utm_* params out of this
|
|
43
|
+
// on the FIRST event of a session (when session_context is sent); without
|
|
44
|
+
// it DeriveAcquisition has nothing to match against and UTM tabs stay
|
|
45
|
+
// empty even when the landing URL carried ?utm_source=... &c.
|
|
46
|
+
const href = safe(() => window.location.href);
|
|
47
|
+
if (href) {
|
|
48
|
+
out.url = href;
|
|
49
|
+
}
|
|
42
50
|
out.online = safe(() => navigator.onLine);
|
|
43
51
|
out.user_agent = safe(() => navigator.userAgent);
|
|
44
52
|
out.navigator_platform = safe(() => navigator.platform);
|
|
@@ -89,7 +97,12 @@ export function collectEventMeta() {
|
|
|
89
97
|
out.visitor_id = safe(() => getVisitorId());
|
|
90
98
|
out.session_id = safe(() => getSessionId());
|
|
91
99
|
out.url = safe(() => window.location.href);
|
|
92
|
-
|
|
100
|
+
const pathname = safe(() => window.location.pathname);
|
|
101
|
+
out.pathname = pathname;
|
|
102
|
+
// Engagement/lifecycle events dispatch directly via sendBeaconCollect and
|
|
103
|
+
// bypass NexlyBase.dispatch (which adds `path` from getDefaultPath). Include
|
|
104
|
+
// `path` here so every event carries it.
|
|
105
|
+
out.path = pathname;
|
|
93
106
|
return filterEmpty(out);
|
|
94
107
|
}
|
|
95
108
|
/** Legacy: full browser metadata (session + event merged). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexly/web",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Nexly browser ingest SDK: sendBeacon transport, DOM metadata, engagement listeners on top of @nexly/core",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"node": ">=20"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@nexly/core": "0.15.
|
|
41
|
+
"@nexly/core": "0.15.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "~6.0.2"
|