Pasting the code directly into a template file breaks rendering of the main page immediately.
Instead use {literal} to surround the <script></script> tags:
{literal}
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:11111,hjsv:6};
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,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
{/literal}
I used head.tpl for that and the code was verified immediately.
From: https://whmcs.community/topic/289265-integrating-hotjar-tracking-js-into-the-head-of-whmcs/
An alternative solution:
https://help.hotjar.com/hc/en-us/articles/115009499708-Install-the-Tracking-Code-with-Google-Tag-Manager