@datalyr/web 1.4.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @datalyr/web v1.4.0
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
@@ -3705,6 +3705,12 @@ class Datalyr {
3705
3705
  * the React Native and iOS SDKs.
3706
3706
  */
3707
3707
  screen(screenName, properties = {}) {
3708
+ if (!this.initialized) {
3709
+ console.warn('[Datalyr] SDK not initialized. Call init() first.');
3710
+ return;
3711
+ }
3712
+ if (!this.shouldTrack())
3713
+ return;
3708
3714
  this.track('pageview', Object.assign({ screen: screenName }, properties));
3709
3715
  }
3710
3716
  /**
@@ -3927,7 +3933,7 @@ class Datalyr {
3927
3933
  resolution_method: 'browser_sdk',
3928
3934
  resolution_confidence: 1.0,
3929
3935
  // SDK metadata
3930
- sdk_version: '1.4.0',
3936
+ sdk_version: '1.4.1',
3931
3937
  sdk_name: 'datalyr-web-sdk'
3932
3938
  };
3933
3939
  return payload;