@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.
- package/dist/devskin.cjs.js +6 -4
- package/dist/devskin.cjs.js.map +1 -1
- package/dist/devskin.esm.js +6 -4
- package/dist/devskin.esm.js.map +1 -1
- package/dist/devskin.umd.js +6 -4
- package/dist/devskin.umd.js.map +1 -1
- package/dist/devskin.umd.min.js +1 -1
- package/dist/devskin.umd.min.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/devskin.cjs.js
CHANGED
|
@@ -14111,11 +14111,13 @@ class DevSkinSDK {
|
|
|
14111
14111
|
pageUrl: window.location.href,
|
|
14112
14112
|
pageTitle: document.title,
|
|
14113
14113
|
};
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14114
|
+
// Send custom track events immediately via sendBeacon (synchronous, survives page navigation)
|
|
14115
|
+
const url = `${this.config.apiUrl || 'https://api.devskin.com'}/v1/rum/events`;
|
|
14116
|
+
const payload = Object.assign(Object.assign({}, eventData), { apiKey: this.config.apiKey, applicationId: this.config.appId, environment: this.config.environment, release: this.config.release });
|
|
14117
|
+
const blob = new Blob([JSON.stringify(payload)], { type: 'application/json' });
|
|
14118
|
+
navigator.sendBeacon(url, blob);
|
|
14117
14119
|
if ((_d = this.config) === null || _d === void 0 ? void 0 : _d.debug) {
|
|
14118
|
-
console.log('[DevSkin] Event tracked:', eventData);
|
|
14120
|
+
console.log('[DevSkin] Event tracked (beacon):', eventData);
|
|
14119
14121
|
}
|
|
14120
14122
|
}
|
|
14121
14123
|
/**
|