How to start the survey in a minimized state

As of August 2014, we have updated our API. If you have used an older version of this code, your survey may not display properly. Please update your code using the examples below, or contact Support for assistance.

In some cases you might want to start your survey in minimized state in order to be more subtle about demanding your visitors' attention. The survey will expand when a visitor clicks the minimized tab.

Below is an example of what it looks like while minimized:



Qualaroo's JavaScript API allows you to do this. Below is the additional API call that will allow you to set the survey to begin in the minimized state. Add this code directly beneath the main Qualaroo JavaScript, within the <script> tag.

// Example minimize-on-start implementation
  onShowNudge = function( nudge_id, node_id ) {
  if ( nudge_id !== '123456' ) { return false; }
    _kiq.push( [ 'minimizeNudge' ] );
  };
  _kiq.push( [ 'eventHandler', 'show', onShowNudge ] );

To find the Survey ID so you can add this code, go to the Edit or Targeting tab of your survey, and copy the number in the URL.

Add text to Minimized Tab

You can also add a short amount of text to your minimized survey, next to the open/close tab. This API call is called setMinLabel. Here's how to add the text:

// Example minimize-on-start implementation
  onShowNudge = function( nudge_id, node_id ) {
  if ( nudge_id !== '123456' ) { return false; }
    _kiq.push( [ 'minimizeNudge' ] );
  };
  _kiq.push( [ 'setMinLabel', 'Feedback' ] ); _kiq.push( [ 'eventHandler', 'show', onShowNudge ] );

Start Survey in Maximized State 

If you would like to make sure that your survey always starts in the maximized state, you can use a similar piece of code to do this:

 // Example maximize-on-start implementation
  onShowNudge = function( nudge_id, node_id ) {
  if ( nudge_id !== '123456' ) { return false; }
    _kiq.push( [ 'maximizeNudge' ] );
  };
  _kiq.push( [ 'eventHandler', 'show', onShowNudge ] );
Have more questions? Submit a request
Powered by Zendesk