Hotjar Analytics
This example shows how you can record your user activity on Findify pages and components (search, recommendations, smart collections).
-
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)
-
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');
});
- 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');
}];
Updated about 1 year ago