@yabhq/nuxt-hotjar
Version:
Module for hotjar implementation in NuxtJS
13 lines (12 loc) • 496 B
JavaScript
if (typeof window !== 'undefined') {
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:'<%= options.hjid %>',hjsv:'<%= options.hjsv %>'};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');
r.async='<%= options.async %>';
r.defer='<%= options.defer %>';
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
}