API for Customer Feedback Project

Exposing the Usersnap API

If you'd like to do further customization with the Usersnap Customer Feedback widget, you need to install the widget with the following JavaScript code.

With the exposed Usersnap API you can - for example - use window.UsersnapCX.open() to open the widget.

<script>
  window.onUsersnapCXLoad = function(api) {
    api.init();
    window.UsersnapCX = api;
  }
</script>
<script src="https://widget.usersnap.com/load/YOUR-API-KEY?onload=onUsersnapCXLoad" async></script>

Setting default values

api.init({
    defaultValues: {
        comment: "it's me!"
    }
});
api.open({
    defaultValues: {
        comment: "it's me!"
    }
});
api.on('open', function(event) {
    event.api.setValue('visitor', 'john@doe.me');
});

Customizing the button

api.init({
    button: {
        isHidden: true
    }
});
api.init({
    button: {
        position: "rightCenter" //or "rightBottom"
    }
});

Setting the email

api.on('open', function(event) {
    event.api.setValue('visitor', 'john@doe.me');
});

Updated 9 days ago

API for Customer Feedback Project


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.