Skip to main content

Survey JS SDK

Survey JS SDK is a Javascript library that helps you to collect feedback from your customers via Dynamic Feedback right inside your website. The SDK is simple to use and can be integrated with your website in a few minutes.

Installation

Copy this snippet and put it within the body tag of your website:

<script type="text/javascript"src="https://survey.filum.ai/sdk_latest.js"></script>

Usage

You can access the SDK via the window.filumSurvey object. The SDK has the following methods:

identify(object)

Identify your users. It takes an object as an argument. Use it when users login to their account.

window.filumSurvey.identify({
'User ID': '123'
})

reset()

Reset the user identity. Use it when users logout from their account.

window.filumSurvey.reset()

show(id, customProps = {})

Show the survey. It takes the first argument as the survey ID.

window.filumSurvey.show('abe314dc-6ec1-4bcf-b264-85d52751b12a')

You can also pass a custom properties object as the second argument. The custom properties will be sent along with the survey response.

window.filumSurvey.show('abe314dc-6ec1-4bcf-b264-85d52751b12a', {
'Transaction ID': '100'
})

hide()

Manually hide the survey.

window.filumSurvey.hide()

Note that the survey will be automatically hidden 5 seconds after the user submits the survey. They can also close the survey by clicking the close button.

Distribution

We distribute those versions of the SDK:

  • sdk_latest.js: The latest version of the SDK.
  • sdk_<version>.js: A specific version of the SDK.

Support

Please contact Filum Engineering Team if you encounter any issues integrating the SDK.