@datalyr/web 1.3.0 → 1.4.1
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/README.md +578 -323
- package/dist/datalyr.cjs.js +12 -4
- package/dist/datalyr.cjs.js.map +1 -1
- package/dist/datalyr.esm.js +12 -4
- package/dist/datalyr.esm.js.map +1 -1
- package/dist/datalyr.esm.min.js +1 -1
- package/dist/datalyr.esm.min.js.map +1 -1
- package/dist/datalyr.js +12 -4
- package/dist/datalyr.js.map +1 -1
- package/dist/datalyr.min.js +1 -1
- package/dist/datalyr.min.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/datalyr.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @datalyr/web v1.
|
|
2
|
+
* @datalyr/web v1.4.1
|
|
3
3
|
* Datalyr Web SDK - Modern attribution tracking for web applications
|
|
4
4
|
* (c) 2026 Datalyr Inc.
|
|
5
5
|
* Released under the MIT License
|
|
@@ -3700,10 +3700,18 @@ class Datalyr {
|
|
|
3700
3700
|
}
|
|
3701
3701
|
}
|
|
3702
3702
|
/**
|
|
3703
|
-
* Track a screen view (for SPAs)
|
|
3703
|
+
* Track a screen view (for SPAs).
|
|
3704
|
+
* Fires a `pageview` event with a `screen` property, consistent with
|
|
3705
|
+
* the React Native and iOS SDKs.
|
|
3704
3706
|
*/
|
|
3705
3707
|
screen(screenName, properties = {}) {
|
|
3706
|
-
this.
|
|
3708
|
+
if (!this.initialized) {
|
|
3709
|
+
console.warn('[Datalyr] SDK not initialized. Call init() first.');
|
|
3710
|
+
return;
|
|
3711
|
+
}
|
|
3712
|
+
if (!this.shouldTrack())
|
|
3713
|
+
return;
|
|
3714
|
+
this.track('pageview', Object.assign({ screen: screenName }, properties));
|
|
3707
3715
|
}
|
|
3708
3716
|
/**
|
|
3709
3717
|
* Associate user with a group/account
|
|
@@ -3925,7 +3933,7 @@ class Datalyr {
|
|
|
3925
3933
|
resolution_method: 'browser_sdk',
|
|
3926
3934
|
resolution_confidence: 1.0,
|
|
3927
3935
|
// SDK metadata
|
|
3928
|
-
sdk_version: '1.
|
|
3936
|
+
sdk_version: '1.4.1',
|
|
3929
3937
|
sdk_name: 'datalyr-web-sdk'
|
|
3930
3938
|
};
|
|
3931
3939
|
return payload;
|