@shakebugs/browser
v1.0.0
Published
Browser SDK for Shake
Downloads
391
Maintainers
Readme
Shake Web SDK
Browser plugin for bug reporting.
Features
| Feature | Available | | :-------------: | :-------: | | Bug reporting | ✅ | | Crash reporting | ❌ | | Users | ❌ |
How to use
Install Shake
NPM
If using npm, execute the npm install command in your terminal:
npm install @shakebugs/browser
CDN
Alternatively, library can be added to your project through CDN. Bundle is delivered through JSDelivr CDN.
Add the following script to your code:
<script type="module">
import Shake from 'https://cdn.jsdelivr.net/npm/@shakebugs/browser@latest/+esm';
window.Shake = Shake;
</script>
Start Shake
Once installed, you can start using the library by including it in your JavaScript files or directly within your HTML.
Call Shake.start()
at the top level of your app
Example usage in Javascript
Call Shake.start()
in your index.js file.
// Import the library if using ES6 modules
import Shake from '@shakebugs/browser';
Shake.start('client-id', 'client-secret', 'website-domain');
Example usage in HTML
Call Shake.start()
in your main file.
<body>
<script>
window.Shake.start('client-id', 'client-secret', 'website-domain');
</script>
</body>
Replace client-id
, client-secret
and website-domain
with the actual values you have in your workspace settings.