Page 1 of 1

Installing Hotjar JavaScript tracking code

Posted: Thu Nov 09, 2017 11:10 am
by dogart
Howdy,

I want to install Hotjar and the instructions are . . .
"We generally recommend putting the Tracking Code inside the <head> area of your site."

Would I add this to the common/header.twig using Theme Editor in Opencart Dashboard
or FTP client and add it to
/catalog/view/theme/default/template/common/header.twig

Thanks in advance

Re: Installing Hotjar JavaScript tracking code

Posted: Thu Nov 09, 2017 11:25 am
by dogart
All sorted!

Re: Installing Hotjar JavaScript tracking code

Posted: Wed May 23, 2018 12:45 am
by WKDesigns
How did you end up getting it to work?

Re: Installing Hotjar JavaScript tracking code

Posted: Wed May 23, 2018 2:04 am
by sw!tch
(e.g
/catalog/view/theme/default/template/common/header.twig

You would add it to the header before the closing </head> tag. I don't use the template editor, but assume that would work for you.

Re: Installing Hotjar JavaScript tracking code

Posted: Thu Jul 16, 2020 9:56 am
by oh.mon
Okay I wish I could understand but what I think is me following the instruction above just isn't working for me!

So I've been pasting the tracking code here: Design > Theme Editor > Default store (the only option) > common/header, and I paste the code before the closing </head> tag.

The code saves but nothing changes and Hotjar doesn't verify the code to be installed on my site.

Would be so grateful for a step-by-step or some detailed advice. Am not a coder in any way.

Re: Installing Hotjar JavaScript tracking code

Posted: Thu Jul 16, 2020 4:03 pm
by sw!tch
That theme editor can be problematic.

If you don't want to touch the core code, you can just enable the Google Analytics module and paste your JS code there. The Google Analytics module can parse script tags and pull into the closing </head>.

Admin -> Extensions -> Analytics -> Google Analytics.

Re: Installing Hotjar JavaScript tracking code

Posted: Wed Sep 16, 2020 11:21 pm
by georgia93
Hello all,

I am also wanting to add in the Hotjar code, however our site is currently operating version 2 of Opencart. How do I do this with an older version? (As I do not have themes etc).

Many thanks!

Re: Installing Hotjar JavaScript tracking code

Posted: Thu Sep 17, 2020 7:25 pm
by ADD Creative
Have you tried the suggestion in the post above yours? viewtopic.php?p=799564#p793542