API Usage

Javascript API Usage

Initialize

The init method starts the Shoutshare widget on your website. The shoutshareOptions argument can be any options found in the Options page.

window._shoutshare('init', shoutshareOptions)

Display

Often there's a need to hide and show the widget programmatically (for example, after a user performs some interaction in the app, you may want to ask for feedback on that interaction). This can be used in conjunction with the 'open' method, to show then open the widget.

window._shoutshare('show')

Hide

To hide the widget, you can call the 'hide' method. Alternatively, if you want the widget to start hidden, you can set the 'hidden' param in the shoutshareOptions when calling 'init'.

window._shoutshare('hide')

Note that this is identical to calling _shoutshare('updateProperties', { hidden: true })

Open

To open the widget, call the 'open' method. This can be used in conjunction with the 'show' method, to display then open the widget.

window._shoutshare('open')

Updating properties

You can update the properties that get sent to Shoutshare when users submit feedback. For example, in a single-page application, if a user changes their username or plan, you can call this method with the new username or plan.

You can call this as many times as you want. This keeps all existing properties, except overwrites properties with the same name.

window._shoutshare('updateProperties', {
newProperty: "newValue"
})

Updating options

You can update the properties that get sent to Shoutshare when users submit feedback. For example, in a single-page application, if a user changes their username or plan, you can call this method with the new username or plan.

You can call this as many times as you want. This keeps all existing properties, except overwrites properties with the same name.

window._shoutshare('updateProperties', {
newProperty: "newValue"
})