@devskin/browser-sdk 1.0.50 → 1.0.52

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.
@@ -14107,9 +14107,13 @@ class DevSkinSDK {
14107
14107
  pageUrl: window.location.href,
14108
14108
  pageTitle: document.title,
14109
14109
  };
14110
- this.transport.sendEvent(eventData);
14110
+ // Send custom track events immediately via sendBeacon (synchronous, survives page navigation)
14111
+ const url = `${this.config.apiUrl || 'https://api.devskin.com'}/v1/rum/events`;
14112
+ const payload = Object.assign(Object.assign({}, eventData), { apiKey: this.config.apiKey, applicationId: this.config.appId, environment: this.config.environment, release: this.config.release });
14113
+ const blob = new Blob([JSON.stringify(payload)], { type: 'application/json' });
14114
+ navigator.sendBeacon(url, blob);
14111
14115
  if ((_d = this.config) === null || _d === void 0 ? void 0 : _d.debug) {
14112
- console.log('[DevSkin] Event tracked:', eventData);
14116
+ console.log('[DevSkin] Event tracked (beacon):', eventData);
14113
14117
  }
14114
14118
  }
14115
14119
  /**