Install Hotjar within the Header
To install the tracking code onto your Wordpress theme, one option would be to place it in the header.php file. However, editing the Wordpress theme this way changes the code on your website's local copy of the theme.
This means that if the theme is updated or re-downloaded later, you would lose changes to the header and the Hotjar tracking code would no longer be installed. Instead we suggest using a Script Installation Plugin.
Install Hotjar using a Script Installation Plugin
Download a Wordpress script installation plugin
OH Add Script to Individual Pages Header Footer is an example of a Wordpress plugin you can use to install the Hotjar tracking code. Any script management plugins you install are not managed by Hotjar. Therefore, if you encounter any challenges during installation of the plugin or experience any incompatibility issues you need to reach out to the plugin author for assistance.
Remember to backup your WordPress installation before installing any new plugins to your site.
Go to hotjar.com to copy the Tracking Code from the Hotjar admin
Paste the tracking code to the header of your site using the plugin you downloaded
If you are using the OH Add Script plugin, you will paste the script in the box shown below.
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 Site Dashboard will show a notice like the one below:
If after you install the Tracking Code, your website undergoes a major design change check to ensure your Tracking Code is still installed.
Once your Tracking Code is installed
You can start using any of Hotjar's 8 features: Heatmaps, Recordings, Forms, Funnels, Polls, Surveys, Recruiters and Incoming Feedback. Have a look at the guides below to get started.
- Creating Your First Heatmap Report
- How to Start Recordings
- Creating Your First Form Report
- Creating Your First Funnel Report
- Creating Your First Poll
- Creating Your First Survey
- Creating Your First Recruiters Widget
- Starting to use Incoming Feedback