@stomio/stomio-web-sdk
v1.13.2
Published
Stomio Web SDK
Downloads
60
Readme
Stomio WebSDK
The Stomio WebSDK empowers users to extend the Stomio platform functionality beyond the Stomio web application. Presently, the primary use case involves embedding the Stomio widget within the customer's web application.
Stomio Widget
The Stomio widget enables you to provide a streamlined Stomio experience to your users without navigating away from your web application.
To utilize the Stomio widget, you must create an in-app
project in your Stomio account. Additionally, you need to install our SDK in your web application.
Your First Project In-App with Stomio Widget
Follow this straightforward tutorial to have the Stomio Widget installed and ready to receive feedback from your users directly in your app.
Step 1: Create a Feedback In-App Project
Create a Feedback
in-app
project in your Stomio account and activate it.Obtain the
Project SDK token
from theDev Info
section. It is necessary when installing the SDK.- The
Secret Key
is shared through the Stomio workspace and is used to sign user data. - The
Project token
is unique to each project and is used to connect the widget to its corresponding project.
- The
Step 2: Installation
Install the library:
Using npm:
npm install @stomio/stomio-web-sdk
Alternatively, use our CDN:
<script src="https://sdk.stomio.io"></script>
Step 3: Configuration
In your web application, initialize the Stomio library, create the widget, and display it.
await stomio.init({
project: 'PROJECT_TOKEN', // replace it with your project SDK token
})
// floating button mode
const widget = stomio.createWidget()
// manual mode
const widget = stomio.createWidget({ mode: 'manual' })
widget.open()
That's it! You have successfully created your in-app project.
More information
Refer to the public documentation for developers on the Stomio website for detailed information.
Typescript types are included in the library.