Hotjar Learning courses are live 🎓
Hotjar now has a beta training platform with courses on how to get the best out of Hotjar. Try out our How to install the Tracking Code course today!
Check your current WordPress plan
Copy the Tracking Code from the Hotjar admin.
Open the WordPress Editor within the Appearance menu.
This updates the local copy only
Editing the theme this way changes the code on your website's local copy of the theme. If the theme is updated or re-downloaded at a later date, you might lose any changes.
Open Header (header.php).
The header.php file will load. It may not look exactly like the file below, but the basic structure should be similar.
Add the Hotjar Tracking Code just before </head>.
The header.php file you see might not contain any <head> HTML tags. If it doesn't, you'll need to find the correct file in your theme that does contain this tag and continue from there.
Your theme's designer or a WordPress specialist would be the best place to start in this case.
Your Hotjar Tracking Code is now installed.
If your WordPress blog uses any caching plugins, you may have to clear your cache to make sure the script is added to your site.
Once you have added the Hotjar Tracking Code to your site, you will need to wait a few minutes for Hotjar to check if it is installed correctly. This usually happens the moment your site is loaded with the Hotjar Tracking Code on it (you can visit the page yourself to speed it up).
Once Hotjar has detected the Tracking Code on your site, the Hotjar interface will show a notice like the one below:
Double-check your Tracking Code installation after making design changes
If your website undergoes a major design change after you install the Tracking Code, check to ensure your Tracking Code is still installed. Design changes may cause the Tracking Code to be removed, which will prevent Hotjar from collecting data.
Getting Started with Hotjar
After installing the Tracking Code, you can start using Hotjar's tools. Have a look at the guides below to get started.