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 experation 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.

Basic Web Link:

Adding one CPP:[custid]=1234

Adding multiple CPPs:[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 `

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 prior to 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.


You can accomplish this by utilizing an HTML onclick event to call the manual launch JavaScript function. The following images 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 set time-span. The following image is a code example which would launch the survey after 10 seconds. Remember to use the correct survey launch code from CX Suite.

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

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.