You can register your own JavaScript functions as callbacks when a certain event happens in your survey. Add this code directly beneath the main Qualaroo javascript.
When the survey is displayed
This event is triggered when the survey is displayed.<script type="text/javascript" charset="utf-8">
_kiq.push(['eventHandler', 'show', function(){
// Execute the following function when the survey has appeared
}]);
</script>
Example: this will minimize a survey right after its ‘show’ event, so that it appears to load minimized.
When the survey is closed
This event is triggered when a visitor submits the survey.
<script type="text/javascript" charset="utf-8">
_kiq.push(['eventHandler', 'close', function(){
// Execute the following function when the survey has been closed
}]);
</script>
When we display a screen
This event is triggered when we display a screen
_kiq.push(['eventHandler', 'nodeRendered', function(nudge_id, screen_id){ //.... }])
When a user replies to a question
This event is triggered when a user replies to a question
_kiq.push(['eventHandler', 'submit', function(answers_array, nudge_id, screen_id){ //... }])
When the Mobile Screener is ready
This event is triggered when the mobile screener is ready
_kiq.push(['eventHandler', 'screenerReady', function(nudge_id, screen_id, screen_height){ //... }])
When there are no surveys to fire
This event is triggered when no surveys are set to fire.
_kiq.push(['eventHandler', 'noTargetMatch', function(){ ///... }])
Comments
0 comments
Article is closed for comments.