@usersnap/browser
v0.0.5
Published
Collect customer feedback and capture screenshots or recordings with Usersnap's website widget.
Downloads
48,312
Maintainers
Readme
Usersnap npm package
Collect customer feedback and capture screenshots or recordings with Usersnap's website widget.
Install the code in minutes. This NPM package is written in TypeScript for installation on browser environments. If you are having issues or wants to help us improve, please visit our help center.
Next, customize the feedback form, enable screen capturing and automatic console log recording, and define audience targeting all in Usersnap's easy-to-use dashboard. Integrate projects to project management tools or service desk platforms, such as Jira, Zendesk, Salesforce.
Quick intro
Installation
Install the package using your preferred package manager.
npm install @usersnap/browser
or
yarn add @usersnap/browser
Space api
Load and control widgets using your spaceApi
key. Recommended way for full support of configured targeting options.
import { loadSpace } from '@usersnap/browser'
const spaceApiKey = '<YOUR_SPACE_API_KEY>'
loadSpace(spaceApiKey).then((api) => {
api.init()
})
Inline form
Embed your feedback form seamlessly on your website.
import { loadEmbed } from '@usersnap/browser'
// DOM node of the page where the widget should get appended to
const targetNode = document.getElementById('embedWidget')
const projectApiKey '<YOUR_PROJECT_API_KEY>'
loadEmbed(projectApiKey).then((api) => {
api.init({
mountNode: document.getElementById(targetNode)!,
})
})
For additional examples, see examples in our testPages
folder.
Development
- Clone GitHub repo
- Install dependencies
git clone [email protected]:usersnap/usersnap.git
yarn
yarn dev
Browsers for playwright must be installed to run e2e tests:
npx playwright install