Hotjar has a WordPress plugin to help install our Tracking Code on sites that use WordPress. You don't need to be on a paid plan with Hotjar to use this plugin. If you'd prefer to install the Tracking Code without using the WordPress plugin, you can do so by following our guide on manually installing the Tracking Code on your site.
Installing the plugin on self-hosted versions of WordPress (from wordpress.org) is free. While sites created on wordpress.com need to be on wordpress.com's Business plan or higher to install plugins. Unfortunately, Hotjar isn't available for wordpress.com sites not on a Business plan or higher, as you can't add custom HTML.
Remember to backup your WordPress installation before installing any new plugins to your site.
Installing Hotjar with the WordPress Plugin
Step-by-Step Guide: WordPress Plugin
Check which version of WordPress you're running.
The official Hotjar plugin is only compatible with WordPress 4.6 or higher. Using the plugin on lower versions will break your site! You can still use Hotjar, but you should instead add the Hotjar Tracking Code to your header.
You can find your WordPress version in the Updates tab of your WordPress dashboard.
On your WordPress dashboard, click Add New within the WordPress Plugins menu.
Search for Hotjar and click Install Now on the official Hotjar plugin.
After the installation is finished, click on Activate.
On your Hotjar Sites page, copy the Site ID for your WordPress site.
The Site ID is the set of numbers to the left of your site's URL.
Inside the WordPress Settings menu, click on Hotjar
Paste your Hotjar Site ID within the text field.
Click Save Changes.
Follow the steps for verifying your Tracking Code installation to ensure the installation was successful.
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.
Still having trouble installing the code?
If your WordPress site uses any caching plugins, you may have to clear your cache to make sure the script is added to your site.
It is also important to wait a few minutes for Hotjar to check if it is installed correctly once the Tracking Code is installed. This usually happens the moment your site is loaded with the Hotjar Tracking Code on it (you can visit your site yourself to speed this up).
You can verify your Hotjar installation by following our article on How to Check That Hotjar Is Working.