ForeSee Developer Portal

Everything you need to configure and optimize your ForeSee products. Home of developer documentation, implementation guides, and release notes.

Blueprint

Feedback

Feedback badge display for Single Page Apps

Normally the Web SDK evaluates inclusion rules for Feedback badge display on each page. Single Page Applications might require more frequent evaluation of these inclusion rules. Refer to Single Page App Notes for more details on this.

Feedback Web Link

Using a web link is, perhaps, the quickest way to start collecting responses. This collection method requires you to create a Feedback survey, configure the URL settings, and publish. The link is offered during this final step and can be copied and pasted as needed. You may use it on your website as a link or send the link in an email.

You can set the link to deactivate on a specified date, and determine the message that displays to visitors who click the link after the set date.


NOTE:
If you copy-paste a survey link into a browser, the OK button at the end of the survey won't work. However, this is not an issue if you click on a survey link (which is the expected operation).

If you would like to suppress the OK button at the end of the survey, you can append ?ok=false at the end of the URL.

Passing CPPs using Web Link

Add the first CPP by appending a string in this format to the end of the URL: ?cpp[name]=value. Additional CPPs are added in the style of &cpp[name2]=value2.

Example:
Basic Web Link:
https://survey.foresee.com/f/40egY2o9Jt

Adding one CPP:
https://survey.foresee.com/f/40egY2o9Jt?cpp[custid]=1234

Adding multiple CPPs:
https://survey.foresee.com/f/40egY2o9Jt?cpp[custid]=1234&cpp[custid2]=abcd

Hiding the Feedback Badge

In some cases, you may want to programmatically hide the Feedback badge based on certain criteria. This can be done with a minor revision to your Cascading Style Sheet (CSS).

Here is an example of code snippet you can place on your site which hides the Feedback badge for devices with a width of 500 pixels or less. This should block the badge for most mobile phones.


NOTE:
This code snippet should ideally be placed in the head section of your site, outside of the <script> tag which contains the ForeSee code snippet.

<style>
@media screen and (max-width:500px) {    // set to 800 px to apply to tablets as well
 ._acsbadge--default
{       display: none !important;     }}  
</style>

Feedback Using JavaScript Function

Custom "call to actions" using the manual launch JavaScript function

The Choose Survey Type page offers a JavaScript function call to manually launch the survey directly from the user interface of the web page instead of using a badge. This allows you to launch the survey from a hyperlink, button, icon, etc.
For Web SDK versions below 19.7.0, the manual launch won't work if the URL is on the Feedback exclusion list. Starting with version 19.7.0, the manual launch does not perform a blacklist check.

Clients can accomplish this by utilizing an HTML onclick event to call the manual launch JavaScript function. Below are some examples of what this would look like, both from a code perspective and a visual perspective.

<a href="#" onclick="return FSR.launchFeedback(‘JhqpBUUlhEMz81CkKqiuXUTgLaF6K8U5’)">Feedback</a>

Automatically launching a Feedback survey after a certain period of time

Using the manual JavaScript deploy option, you can automatically launch a Feedback survey after a certain period of time. Here is a code example which would launch the survey after 10 seconds. Remember to use the correct code survey launch code from CX Suite.

<script>
setTimeout(function(){fsReady(function(){FSR.launchFeedback(‘JhqpBUUlhEMz81CkKqiuXUTgLaF6K8U5’)})}, 10000);
</script>

Other Feedback options

The manual JavaScript deploy option also enables more advanced logic if you can build it.

For example, if you want to survey only users that come from a certain page/flow by, you can set an identifying cookie on those pages, and then only call the Feedback Javascript when that cookie value is found.