@whisperguard/rum-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

@whisperguard/rum-sdk

npm NPM version

Install

https://nodei.co/npm/@whisperguard/rum-sdk.png?downloads=true&downloadRank=true&stars=true

npm install @whisperguard/rum-sdk

Browser

<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

Package Sidebar

Install

npm i @whisperguard/rum-sdk

Weekly Downloads

0

Version

1.4.0

License

none

Unpacked Size

65.1 kB

Total Files

14

Last publish

Collaborators

  • carlosnunez