Hotjar

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
ReneH4
Contributor
Posts: 145
Joined: Mon Oct 26, 2020 12:00 pm
Phoenix Version:
Has thanked: 13 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
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
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
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 12 times
Been thanked: 11 times

Re: Hotjar

Post by mhsuffolk »

Got it working thanks to @LeeFoster

It was the addition of the word public that did it.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
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
Contributor
Posts: 145
Joined: Mon Oct 26, 2020 12:00 pm
Phoenix Version:
Has thanked: 13 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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply