Suppressing the Verint XM Invitation

There are times when you might need to suppress the survey invitation if it might appear at an inappropriate time that can't be predicted with a simple URL pattern. There is a useful API method that uses CSS to hide the invitation as of Verint XM Web SDK version 19.5.2+.

By temporarily adding a CSS rule to the page, the display property of the root node is overridden. You can efficiently suppress the UI portion of the code and restore it after the fact.

Please note that this applies on a per page basis and is not persistent beyond the user's session.

// Method 1: To hide the ForeSee invitation.
fsReady(function() {
FSR.setFSRVisibility(true);
});
 
// Method 2: To allow for the ForeSee HTML and CSS to appear.
fsReady(function() {
FSR.setFSRVisibility(false);
});

This is harmless to do if the invitation is not actually present, which means you don't need to verify if it's actually on the page when doing this.