Add Hotjar to Joomla

See where visitors click, how far they scroll and what they think with Hotjar heatmaps, recordings and surveys on Joomla, using one HTML snippet.

Add Hotjar to Joomla

Your analytics show how many visitors reach a page, but not where they click, how far they scroll, or what they were looking for when they gave up. Hotjar answers those questions with heatmaps, session recordings and on-page surveys. Its tracking code belongs in your site's <head>, and pasting it into your template's files means the next template update wipes it out. You can add Hotjar to Joomla with one HTML snippet in Code Snippets.

Get your tracking code

You need a Hotjar account with your site added to it.

  1. Sign in to Hotjar.
  2. Open the Sites & Organizations page.
  3. Click Install tracking code next to the site you want to track.
  4. Click Copy.

The snippet code

Your tracking code looks like this, with your Site ID in place of YOUR_SITE_ID:

<script>
    (function(h,o,t,j,a,r){
        h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
        h._hjSettings={hjid:YOUR_SITE_ID,hjsv:6};
        a=o.getElementsByTagName('head')[0];
        r=o.createElement('script');r.async=1;
        r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
        a.appendChild(r);
    })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>

Always paste the code you copied from Hotjar, so you get your own Site ID and Hotjar's current version. In the Site Header location it lands in the <head> of every page, where Hotjar expects it.

How to add this snippet

  1. Install Code Snippets if it isn't installed already.
  2. Log into your Joomla backend.
  3. Go to Components → Tassos Code Snippets.
  4. Click New.
  5. Enter a title, for example Hotjar.
  6. Set Code Type to HTML.
  7. Set Insertion Method to Auto-Insert Locations.
  8. Set Location to Site Header.
  9. Paste your Hotjar tracking code into the editor.
  10. Click Save & Close.

To track only some pages, like your landing pages, open the Conditional Logic tab before you save and choose them there. Learn more in Conditional Logic.

Check that it works

  1. Open your site in a normal browser window with no ad blocker.
  2. Go back to the Sites & Organizations page in Hotjar.

Hotjar checks the install on its own, usually within a few minutes of your first visit. If it doesn't confirm it, check that the snippet is published and that the Site ID matches the one in Hotjar. Hotjar's How to Check That Hotjar Is Working guide has more checks.

To add another behavior analytics tool, see Add Microsoft Clarity to Joomla. For traffic numbers, see Add Google Analytics to Joomla. To learn more about how HTML snippets work, read the HTML snippet docs.

Last updated on Oct 15th 2026 14:10