Client Code (Web SDK) - SDK Extension Points

ForeSee® SDK extension points allow you, as a client, to add some functionality to the ForeSee® Client Code to enhance the experience for your site visitor or to augment your response data.

Extension Point Use Cases

  • You want to send additional data points with the survey response to further enhance your respondent data for segmentation purposes. See Customer Passed Parameters below.
  • You want to prevent multiple “invitation” like overlays to appear in one user session. See Getting Invitation Status.
  • You want to send an event to your analytics tool that indicates an invitation has been shown, accepted, or declined. See API Event Hooks.

Customer Passed Parameters API

If you want to call product specific API methods, you should wrap them in our special fsReady() callback function. The reason for this is that, due to the asynchronous way that the ForeSee code is loaded onto the page, there is no guarantee that specific methods will be available when you want to use them. Wrapping your calls in fsReady() guarantees that they are. For example, to display the ForeSee survey (CX Measurement), you call FSR.CPPS.set('name','value'). Using hosted code, this is how you write that:

// This should appear BELOW the foresee embed snippet
fsReady(function() {
     FSR.CPPS.set('name','value');
});

You can also do this with HTML events:

Articles in this section:

  1. Getting Invitation Status
  2. API Event Hooks