e-satisfaction

The #1 Humanized Marketing Platform

Ιntegration Step 1: Core Library

Follow

The integration code includes a simple script that has to be loaded to the site to allow the e-satisfaction integration and collection. 

The integration script require jQuery (minimum version 1.7.1) to work but it does not include it by default.

Library

Place the following script in the head section of your website.

Replace YOUR-APPLICATION-ID with the application id that you are trying to integrate, found in the application settings in the dashboard.

Case 1: Your website does not have jQuery

(function (w, d, id, jq, c) {
   // Define e-satisfaction collection configuration
   w.esat_config = {application_id: id, collection: c || {}};

   // Update metadata
   w.Esat = w.Esat || {};
   w.Esat.updateMetadata = function (q, m) {
       w.esat_config.collection[q] = w.esat_config.collection[q] || {};
       w.esat_config.collection[q].metadata = m;
   };

   // Setup script
   var l = function () {
       var r = d.getElementsByTagName('script')[0], s = d.createElement('script');
       s.async = true;
       s.src = 'https://collection.e-satisfaction.com/dist/js/integration' + (!!jq ? '.jq' : '') + '.min.js';
       r.parentNode.insertBefore(s, r);
   };

   if (w.attachEvent) {
       w.attachEvent('onload', l);
   } else {
       w.addEventListener('load', l, false);
   }
})(window, document, 'YOUR-APPLICATION-ID', true, {});

NOTE: The jQuery embedded with the above script is v3.2.1.

Case 2: Your website has jQuery

(function (w, d, id, jq, c) {
   // Define e-satisfaction collection configuration
   w.esat_config = {application_id: id, collection: c || {}};

   // Update metadata
   w.Esat = w.Esat || {};
   w.Esat.updateMetadata = function (q, m) {
       w.esat_config.collection[q] = w.esat_config.collection[q] || {};
       w.esat_config.collection[q].metadata = m;
   };

   // Setup script
   var l = function () {
       var r = d.getElementsByTagName('script')[0], s = d.createElement('script');
       s.async = true;
       s.src = 'https://collection.e-satisfaction.com/dist/js/integration' + (!!jq ? '.jq' : '') + '.min.js';
       r.parentNode.insertBefore(s, r);
   };

   if (w.attachEvent) {
       w.attachEvent('onload', l);
   } else {
       w.addEventListener('load', l, false);
   }
})(window, document, 'YOUR-APPLICATION-ID', false, {});

By adding the above script, the browse questionnaire will automatically be displayed to your customers.

jQuery compatibility

The integration script has been tested and works with the following jQuery versions:

  • jQuery 1.*
    • jQuery 1.7.* 
    • jQuery 1.8.*
    • jQuery 1.9.*
    • jQuery 1.10.*
    • jQuery 1.11.*
    • jQuery 1.12.*
  • jQuery 2.*
    • jQuery 2.0.*
    • jQuery 2.1.*
    • jQuery 2.2.*
  • jQuery 3.*
    • jQuery 3.0.*
    • jQuery 3.1.*
    • jQuery 3.2.*
    • jQuery 3.3.*

Testing your installation

After completing the above steps, the Browse (Box) questionnaire should be displayed to your site, like the example: 

  

Troubleshooting

In case you face any problem with the display of the Browse questionnaire (box) please follow our  troubleshooting guide here.

Next Steps

Push Metadata

If you want to push metadata during the browse questionnaire integration, follow the guidelines here.

Integrate Checkout Questionnaire

Now that you have completed the 1st step of Integration, please click here to find the integration process for Checkout Questionnaire. 

Was this article helpful?
0 out of 0 found this helpful

Comments