This example shows how you can record your user activity on Maropost Merchandising Cloud (formerly Findify) pages and components (search, recommendations, smart collections).
- Create a javascript trigger for heatmaps in HotJar dashboard and name it findify_mjs (
)
- Create a file on your server containing the hotjar script (for example
)
JavaScript
(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 our script (remember to put the proper hotjar script path)
JavaScript
/*global findifyApiRegistry*/window.findifyApiRegistry = [function(api) { api.addScript('https://mystore.com/hotjar.js');}];