Feedbackly
v. 5.0.3
v. 5.0.3
  • Getting started
  • Fetch API
    • Authentication
    • Responses
      • GET Responses
      • GET Response by id
    • Response chains
      • GET Response-chains
      • GET Response-chain by id
    • Questions
      • GET Questions
      • GET Question by id
    • Surveys
      • GET Surveys
      • GET Surveys by id
    • Touchpoints
      • GET Touchpoints
      • GET Touchpoint by id
    • Unsubscriptions
      • GET Unsubscriptions
      • GET Unsubscriptions by Channel id
    • Notes
      • Entity relationships
      • Pagination
      • Question types
  • Dispatch API
    • Authentication
    • Preparing Campaign
    • Sending Surveys
      • POST Trigger
  • Website widgets
    • Getting started
    • Attaching custom metadata to responses
    • Triggering surveys via custom properties
    • Widget Hooks
    • Setting the language
    • Debugging website widgets
Powered by GitBook
On this page
  1. Website widgets

Widget Hooks

On Survey Loaded

This action will trigger the given callback function when the survey is loaded and shown.

FBLY.action("onSurveyLoaded", () => { /* Your code */})

On Response

This action will trigger the given callback function immediately after a customer answers a question of the survey. This means, if the survey has 3 questions the function will be called each time a question in answered, in this case 3 times. The response object will be passed as the first argument of the function. Available fields include:

surveyId

12 byte ObjectId

questionId

12 byte ObjectId

touchpointId

12 byte ObjectId

language

string (ISO 639-1 language code)

data

varies

FBLY.action("onResponse", (r) => { /* Your code */})

On Survey Finished

This action will trigger the given callback function after the survey is completed.

FBLY.action("onSurveyFinished", () => { /* Your code */})

on Survey Close

This action will trigger the given callback function if the survey closes either by user or programmatically. "isDeclined" flag is true only if the user closed the survey or if FBLY.close(userDeclined) called with userDeclined = true

FBLY.action("onClose", (isDeclined) => { /* Your code */})
PreviousTriggering surveys via custom propertiesNextSetting the language

Last updated 2 years ago