Page 1 of 1

Hotjar

Posted: Tue Apr 13, 2021 11:51 am
by mhsuffolk
1.0.5.0 PHP 7.3

I am interested in trying Hotjar but cannot work out where the code goes. They give you a script which according to their instructions it needs needs to be in the <head> of my site. The only place I can see this is in template_top.php but this does not work.

Any suggestions please.

Re: Hotjar

Posted: Tue Apr 13, 2021 12:19 pm
by ReneH4
Would this not work using a self-made hook?

How to create a hook is very nice explained by @zipurman:

https://www.youtube.com/watch?v=bLd9m_u ... restonLord

Re: Hotjar

Posted: Tue Apr 13, 2021 5:26 pm
by LeeFoster
Yeah you should be able to make your own hook using

public function listen_injectSiteStart() {

Re: Hotjar

Posted: Thu Apr 15, 2021 9:42 am
by mhsuffolk
Got it working thanks to @LeeFoster

It was the addition of the word public that did it.

Re: Hotjar

Posted: Thu Apr 15, 2021 9:49 am
by LeeFoster
mhsuffolk wrote: Thu Apr 15, 2021 9:42 am Got it working thanks to @LeeFoster

It was the addition of the word public that did it.
Happy to help.

Re: Hotjar

Posted: Thu Apr 15, 2021 1:06 pm
by ReneH4
Well done!
mhsuffolk wrote: Thu Apr 15, 2021 9:42 am Got it working thanks to @LeeFoster

It was the addition of the word public that did it.