The Hotjar Tracking Code needs to be installed within your site in order to start collecting data. This JavaScript snippet can be found within your Site Dashboard or in the Sites & Organizations page by clicking on the 'Tracking Code' button next to the site URL.
Each site you add to your Hotjar account will have its own unique Tracking Code to install.
In order to install the Tracking Code, you can either follow one of our platform-specific guides, or you can manually install the Tracking Code.
Install Using a Platform Specific Guide
If you are using one of the below platforms, we recommend referring to the installation guide for step-by-step instructions.
Manually Installing the Code
If you prefer to install the Tracking Code manually, or if your specific platform is not listed above, follow the below instructions.
Check if your platform is compatible with Hotjar.
If you aren’t sure if your platform can be used with Hotjar, you can check out our guide on Platforms and Frameworks Not Compatible with Hotjar.
Go to your Sites list.
Click on the Tracking Code button for the Site you want to track.
Click on Copy to Clipboard.
Paste the Tracking Code into the <head> section of your website.
Hotjar works most accurately if the Hotjar Tracking Code is in the Head tag (<head>) of every page you want to track on your site.
Add the Tracking Code to your website template
We recommend adding the Tracking Code to your website template so that it automatically goes into each page of your site.
Check your Hotjar Site Dashboard to verify the installation.
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 code on it, but there can be a delay before it shows as "Active".
Once Hotjar has detected the Tracking Code on your site, the Site Dashboard will show a notice on your Recent Team Activity like the one below:
For more information and methods to verify your Tracking Code, check out How to Verify Hotjar is Installed.
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?
You can verify the installation manually by following these steps or reach out to our support team so we can help you!
Once Your Tracking Code is Installed
You can start using any of Hotjar's features: Heatmaps, Recordings, Surveys, and Incoming Feedback. Have a look at the guides below to get started.
- Creating Your First Heatmap with Snapshots
- How to Start Continuous Heatmaps
- How to Start Recordings on Basic Plans
- How to Start Continuous Recordings
- Creating Your First Survey
- Starting to use Incoming Feedback
Next Steps
- Add team members to your organization.
- Add sites to your organization.
- Understand the difference between Accounts, Organizations, and Sites.
- Use Hotjar for your clients.