saasco-sdk 0.1.5 → 0.1.6

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 CHANGED
@@ -201,6 +201,7 @@ Any property that starts with `$` is a property that has been generated by the S
201
201
  | $latitude | Latitude | Latitude of the user's IP location. |
202
202
  | $longitude | Longitude | Longitude of the user's IP location. |
203
203
  | $timezone | Timezone | Timezone of the user parsed from the IP. |
204
+ | $locale | Locale | The most recent preferred language of the user. |
204
205
  | $screenHeight | Screen Height | The most recent height of the device screen in pixels |
205
206
  | $screenWidth | Screen Width | The most recent width of the device screen in pixels |
206
207
  | $screenDpi | Screen DPI | The most recent Pixel density of the device screen. |
package/index.cjs.js CHANGED
@@ -523,8 +523,8 @@ class Saasco {
523
523
  this.log('Saasco is already initialized. Please check your code to ensure that init() is not being called multiple times.');
524
524
  return;
525
525
  }
526
- this.initiAutoPageTracking();
527
526
  this.log('Saasco initialized', this.config);
527
+ this.initiAutoPageTracking();
528
528
  this.isInitialized = true;
529
529
  }
530
530
  debug(value) {
@@ -562,14 +562,14 @@ class Saasco {
562
562
  // Only has 96.63% global support, so we need to check for undefined
563
563
  const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
564
564
  const $location = isBrowser ? timezones[timezone] || ((_a = $locale === null || $locale === void 0 ? void 0 : $locale.split('-')) === null || _a === void 0 ? void 0 : _a[1]) || 'undefined' : undefined;
565
- const $userAgent = isBrowser ? window.navigator.userAgent : undefined;
566
- const $title = isBrowser ? document.title : undefined;
567
- const $pathname = isBrowser ? window.location.pathname : undefined;
568
565
  const $href = isBrowser ? window.location.href : undefined;
566
+ const $pathname = isBrowser ? window.location.pathname : undefined;
567
+ const $referrer = isBrowser ? document.referrer : undefined;
568
+ const $screenDPI = isBrowser ? window.devicePixelRatio : undefined;
569
569
  const $screenHeight = isBrowser ? screen.height : undefined;
570
570
  const $screenWidth = isBrowser ? screen.width : undefined;
571
- const $screenDPI = isBrowser ? window.devicePixelRatio : undefined;
572
- const $referrer = isBrowser ? document.referrer : undefined;
571
+ const $title = isBrowser ? document.title : undefined;
572
+ const $userAgent = isBrowser ? window.navigator.userAgent : undefined;
573
573
  const data = {
574
574
  id: uuid.v4(),
575
575
  timestamp: new Date().toISOString(),
package/index.esm.js CHANGED
@@ -519,8 +519,8 @@ class Saasco {
519
519
  this.log('Saasco is already initialized. Please check your code to ensure that init() is not being called multiple times.');
520
520
  return;
521
521
  }
522
- this.initiAutoPageTracking();
523
522
  this.log('Saasco initialized', this.config);
523
+ this.initiAutoPageTracking();
524
524
  this.isInitialized = true;
525
525
  }
526
526
  debug(value) {
@@ -558,14 +558,14 @@ class Saasco {
558
558
  // Only has 96.63% global support, so we need to check for undefined
559
559
  const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
560
560
  const $location = isBrowser ? timezones[timezone] || ((_a = $locale === null || $locale === void 0 ? void 0 : $locale.split('-')) === null || _a === void 0 ? void 0 : _a[1]) || 'undefined' : undefined;
561
- const $userAgent = isBrowser ? window.navigator.userAgent : undefined;
562
- const $title = isBrowser ? document.title : undefined;
563
- const $pathname = isBrowser ? window.location.pathname : undefined;
564
561
  const $href = isBrowser ? window.location.href : undefined;
562
+ const $pathname = isBrowser ? window.location.pathname : undefined;
563
+ const $referrer = isBrowser ? document.referrer : undefined;
564
+ const $screenDPI = isBrowser ? window.devicePixelRatio : undefined;
565
565
  const $screenHeight = isBrowser ? screen.height : undefined;
566
566
  const $screenWidth = isBrowser ? screen.width : undefined;
567
- const $screenDPI = isBrowser ? window.devicePixelRatio : undefined;
568
- const $referrer = isBrowser ? document.referrer : undefined;
567
+ const $title = isBrowser ? document.title : undefined;
568
+ const $userAgent = isBrowser ? window.navigator.userAgent : undefined;
569
569
  const data = {
570
570
  id: v4(),
571
571
  timestamp: new Date().toISOString(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saasco-sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0",
6
6
  "@lukeed/uuid": "^2.0.1",