@devskin/browser-sdk 1.0.51 → 1.0.53

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,11 +14107,13 @@ class DevSkinSDK {
14107
14107
  pageUrl: window.location.href,
14108
14108
  pageTitle: document.title,
14109
14109
  };
14110
- this.transport.sendEvent(eventData);
14111
- // Flush immediately so custom events are sent before potential page navigation
14112
- this.transport.flush();
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);
14113
14115
  if ((_d = this.config) === null || _d === void 0 ? void 0 : _d.debug) {
14114
- console.log('[DevSkin] Event tracked:', eventData);
14116
+ console.log('[DevSkin] Event tracked (beacon):', eventData);
14115
14117
  }
14116
14118
  }
14117
14119
  /**