Friday, December 14, 2012

ForeSee Integration with Drupal 7

Large or small, no organization can exist without satisfying its customers. Our passion at ForeSee is helping our clients deliver even greater satisfaction to their customers. We collect millions of satisfaction survey responses annually, quantifying voice of customer and putting it in context to support strategic and tactical decisions

 Integrating foresee results into drupal 7 is quite easy task. but there is not clear document which tells how this can be achieved. with my experience, i planned to make up a document which can be useful to other developers. Create a folder in sites/all/libraries/foresee - Purchase foresee license and obtain the javascript from them. - Place that entire javascript/css/images in sites/all/libraries/foresee - edit your sites/all/theme//template.php - add the following code.

function yourtheme_preprocess_page(&$variables, $hook) { drupal_add_js('sites/all/libraries/foresee/foresee-trigger.js');
}



there is another section that needs to be configured is the foresee-trigger.js

 var $FSR = {
'timestamp': 'February 10, 2012 @ 9:13 AM',
'version': '11.2.2',
'enabled': true,
'sessionreplay': true,
'auto' : true,
'encode' : true,
'files': '/sites/all/libraries/foresee/',
'id': 'xxxxxxxxxxxxxxxx',
'definition': 'foresee-surveydef.js',
'replay_id': 'example.com',
'renderer':'W3C', // or "ASRECORDED"
'layout':'CENTERFIXED', // or "LEFTFIXED" or "LEFTSTRETCH" or "CENTERSTRETCH"
'sites': [
{
path: /\w+-?\w+\.(com|org|edu|gov|net|co\.uk)/
},
{
path: '.',
domain: 'default'
}
],
storageOption: 'cookie'
};

clear your cache and let it go 

No comments:

Post a Comment