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