Hotjar

Ask the community for help and support.
Post Reply
User avatar
mhsuffolk
VIP Member
VIP Member
Posts: 146
Joined: Sat Oct 26, 2019 9:13 am
Has thanked: 8 times
Been thanked: 5 times

Hotjar

Post 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.
Live shop Phoenix 1.0.9.0 on PHP 8.0
User avatar
ReneH4
Posts: 154
Joined: Mon Oct 26, 2020 12:00 pm
Has thanked: 12 times
Been thanked: 17 times

Re: Hotjar

Post 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
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Hotjar

Post by LeeFoster »

Yeah you should be able to make your own hook using

public function listen_injectSiteStart() {
User avatar
mhsuffolk
VIP Member
VIP Member
Posts: 146
Joined: Sat Oct 26, 2019 9:13 am
Has thanked: 8 times
Been thanked: 5 times

Re: Hotjar

Post by mhsuffolk »

Got it working thanks to @LeeFoster

It was the addition of the word public that did it.
Live shop Phoenix 1.0.9.0 on PHP 8.0
LeeFoster
VIP Member
VIP Member
Posts: 228
Joined: Sun Feb 28, 2021 9:41 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Hotjar

Post 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.
User avatar
ReneH4
Posts: 154
Joined: Mon Oct 26, 2020 12:00 pm
Has thanked: 12 times
Been thanked: 17 times

Re: Hotjar

Post 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.
Post Reply