@whisperguard/rum-sdk
Install
npm install @whisperguard/rum-sdk
<script src="//statics.whisperguard.com/production/whisperguard-lib.min.js"></script>
How to use it
Using the NPM PACKAGE
Import package to the project
import whisperguard from "@whisperguard/rum-sdk";
Initialize it with whisperguard project token:
whisperguard.init({
projectId: 'Your project id',
token: 'A valid token',
sampleRate: 1,
env: '' // [OPTIONAL] The environment in which the sdk is being executed, for example: production
version: '' // [OPTIONAL] The current version of your application.
});
Using a CDN file
(function(h, o, u, n, d) {
h = h[d] = h[d] || {
q: [],
onReady: function(c) {
h.q.push(c)
}
}
d = o.createElement(u);
d.async = 0;
d.src = n
n = o.getElementsByTagName(u)[0];
n.parentNode.insertBefore(d, n)
})(window, document, 'script', 'https://static.whisperguard.com/production/whisperguard.lib.min.js', 'whisperguard')
whisperguard.onReady(function() {
whisperguard.init({
projectId: 'Your project id',
token: 'A valid token',
sampleRate: 1, // 1 - 100 where 100 mean collect all sessions and 1 mean collect 1 from each 100 sessions
env: '' // [OPTIONAL] The environment in which the sdk is being executed, for example: production
version: '' // [OPTIONAL] The current version of your application.
});
})
For more info visit https://www.whisperguard.com