Hotjar integration

This examples shows how you can record your user activity on Findify pages and components (search, recommendations, smart collections).

  1. Create a javascript trigger for heatmaps in HotJar dashboard and name it findify_mjs (https://docs.hotjar.com/v1.0/docs/using-javascript-to-trigger-heatmaps)

  2. Create a file on your server containing the hotjar script (for example https://mystore.com/hotjar.js)

(function(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:1,hjsv:5};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');

window.setTimeout(function() {
    window.hj('trigger', 'findify_mjs');
});
  1. Please add this code before the Findify script (remember to put the proper hotjar script path)
/*global findifyApiRegistry*/
window.findifyApiRegistry = [function(api) {
    api.addScript('https://mystore.com/hotjar.js');
}];