@nexly/web 0.15.2 → 0.15.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/dist/browser-meta.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
/** Session-stable metadata: user agent, screen, language, timezone, etc. */
|
|
7
7
|
export declare function collectSessionMeta(): Record<string, unknown>;
|
|
8
|
-
/** Per-event volatile metadata: visitor/session IDs, current URL/
|
|
8
|
+
/** Per-event volatile metadata: visitor/session IDs, current URL/path. */
|
|
9
9
|
export declare function collectEventMeta(): Record<string, unknown>;
|
|
10
10
|
/** Legacy: full browser metadata (session + event merged). */
|
|
11
11
|
export declare function collectBrowserMeta(): Record<string, unknown>;
|
|
@@ -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,0EAA0E;AAC1E,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAe1D;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);
|
|
@@ -80,7 +88,7 @@ export function collectSessionMeta() {
|
|
|
80
88
|
}
|
|
81
89
|
return filterEmpty(out);
|
|
82
90
|
}
|
|
83
|
-
/** Per-event volatile metadata: visitor/session IDs, current URL/
|
|
91
|
+
/** Per-event volatile metadata: visitor/session IDs, current URL/path. */
|
|
84
92
|
export function collectEventMeta() {
|
|
85
93
|
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
86
94
|
return {};
|
|
@@ -90,7 +98,6 @@ export function collectEventMeta() {
|
|
|
90
98
|
out.session_id = safe(() => getSessionId());
|
|
91
99
|
out.url = safe(() => window.location.href);
|
|
92
100
|
const pathname = safe(() => window.location.pathname);
|
|
93
|
-
out.pathname = pathname;
|
|
94
101
|
// Engagement/lifecycle events dispatch directly via sendBeaconCollect and
|
|
95
102
|
// bypass NexlyBase.dispatch (which adds `path` from getDefaultPath). Include
|
|
96
103
|
// `path` here so every event carries it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexly/web",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
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.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "~6.0.2"
|