Post by dogart » Thu Nov 09, 2017 11:10 am

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

New member

Posts

Joined
Tue Aug 15, 2017 9:58 pm

Post by dogart » Thu Nov 09, 2017 11:25 am

All sorted!

New member

Posts

Joined
Tue Aug 15, 2017 9:58 pm

Post by WKDesigns » Wed May 23, 2018 12:45 am

How did you end up getting it to work?

New member

Posts

Joined
Fri Nov 10, 2017 3:09 am

Post by sw!tch » Wed May 23, 2018 2:04 am

(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.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by oh.mon » Thu Jul 16, 2020 9:56 am

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.

Newbie

Posts

Joined
Thu Jul 16, 2020 9:47 am

Post by sw!tch » Thu Jul 16, 2020 4:03 pm

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.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by georgia93 » Wed Sep 16, 2020 11:21 pm

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!

Newbie

Posts

Joined
Wed Sep 16, 2020 11:19 pm

Post by ADD Creative » Thu Sep 17, 2020 7:25 pm

Have you tried the suggestion in the post above yours? viewtopic.php?p=799564#p793542

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by mitrecyclers » Wed Mar 31, 2021 6:17 pm

sw!tch wrote:
Thu Jul 16, 2020 4:03 pm
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.
I already have google Analytics working on my website as well. Can I add HotJar code in same? at which point

Code: Select all

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-XXXX');
</script>

For all of your Mobile phone needs.
https://mitrecyclers.com


Active Member

Posts

Joined
Tue Sep 25, 2018 5:34 pm

Post by sw!tch » Thu Apr 01, 2021 12:45 am

mitrecyclers wrote:
Wed Mar 31, 2021 6:17 pm
I already have google Analytics working on my website as well. Can I add HotJar code in same? at which point
Yes. Just add it below your existing google Analytics script.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: No registered users and 125 guests