How to Add Hotjar to WordPress for Beginner Website Insights

Most website owners track visits and clicks through Google Analytics — and stop there. Analytics tells you what happened on your site, but not why. You can see a page has a high bounce rate, but you can’t see where visitors got confused, what they ignored, or where they gave up. That’s the gap Hotjar fills.

Hotjar is a behaviour analytics tool that records real visitor sessions, generates heatmaps showing where people click and scroll, and lets you collect feedback directly on your pages. It’s widely used by web designers and site owners who want to go beyond raw numbers and actually see how people interact with their website.

Installing Hotjar on WordPress takes about five minutes. This guide covers two installation methods, how to set up your first heatmap and recording, and what to look for once the data starts coming in.

What Hotjar Does

Before installing anything, it helps to know what you’re actually getting. Hotjar gives you three main tools:

  • Heatmaps — visual overlays showing where visitors click, move their cursor, and how far down they scroll. Scroll maps are especially useful for spotting where most visitors stop reading.
  • Session recordings — anonymised replays of individual visitor sessions, so you can watch exactly how someone moved through a page, where they hesitated, and where they left.
  • Feedback widgets — small on-page survey prompts that let you ask visitors a question and collect short responses without sending them to a separate form.

Hotjar has a free plan that covers most beginner needs. The free tier includes up to 35 daily sessions in recordings and basic heatmaps, which is enough to start identifying patterns on a new or low-traffic site.

How to Install Hotjar on WordPress

There are two ways to add Hotjar to a WordPress site: using the official plugin, or pasting the tracking code manually into your theme. I usually use the plugin method on sites I manage — it’s cleaner and doesn’t break if the theme is updated.

Method 1: The Official Hotjar Plugin

WordPress has an official Hotjar plugin that handles the tracking code installation for you.

  1. Log in to your WordPress dashboard and go to Plugins > Add New Plugin.
  2. Search for Hotjar and install the plugin called “Hotjar — Heatmaps & User Behavior Analytics”.
  3. Activate the plugin.
  4. Go to Settings > Hotjar in your WordPress dashboard.
  5. Enter your Hotjar Site ID and save. You’ll find this number in your Hotjar account under Site Settings.

That’s the full installation. The plugin inserts the tracking code on every page of your site automatically.

Method 2: Manual Tracking Code

If you’d prefer not to use a plugin, or if you’re already managing scripts through a tag manager, you can paste the Hotjar tracking code directly.

  1. Log in to your Hotjar account and go to Site Settings > Tracking Code.
  2. Copy the JavaScript snippet Hotjar provides.
  3. In WordPress, go to Appearance > Theme File Editor (or use a plugin like WPCode to insert header scripts).
  4. Paste the snippet inside the <head> section of your theme, before the closing </head> tag.
  5. Save the file.

If you’re using Google Tag Manager, you can also fire the Hotjar script through a custom HTML tag rather than editing theme files directly. This is a good option if you already have GTM installed and want to keep all third-party scripts in one place. For a comparable approach with another analytics tool, adding Microsoft Clarity to WordPress follows a very similar process and is worth considering alongside Hotjar.

Setting Up Your First Heatmap

Once the tracking code is live, Hotjar starts collecting data automatically — but heatmaps work best when you set them up for specific pages rather than relying on the defaults.

  1. In your Hotjar account, go to Heatmaps and click New Heatmap.
  2. Give it a name and enter the URL of the page you want to track. Your homepage and most-visited landing pages are good starting points.
  3. Choose whether to track clicks, move (cursor movement), or scroll. I usually start with scroll and clicks — these show the most useful patterns quickly.
  4. Set a sample size. The default is usually fine for low-traffic sites.
  5. Click Create.

Hotjar needs a minimum number of page views before a heatmap becomes statistically meaningful. For low-traffic sites, give it a week or two before drawing conclusions from the data.

Setting Up Session Recordings

Session recordings start automatically once Hotjar is installed and the recording feature is enabled. Hotjar anonymises recordings by masking text fields and personal data by default, which is important for GDPR compliance.

  1. In your Hotjar account, go to Recordings.
  2. Check that recordings are enabled for your site. If not, toggle the feature on in Site Settings.
  3. Set the capture rate to control what percentage of sessions are recorded. On the free plan, this is capped at 35 sessions per day.
  4. Use the filter options to focus on specific pages, traffic sources, or session lengths when reviewing recordings.

When watching recordings, focus on sessions where visitors landed on a key page — your homepage, a services page, or a product page — and left without converting. These sessions often reveal friction that analytics alone can’t surface.

Practical Tips for Getting Useful Data

Installing Hotjar and leaving it running in the background won’t get you much. These habits make the data more actionable:

  • Track your most important pages first. Set up heatmaps on your homepage and any page you’re actively trying to improve, rather than running heatmaps across the entire site at once.
  • Check the scroll map before editing content. If most visitors stop scrolling before reaching your call to action, moving that element higher will have more impact than rewriting the copy.
  • Filter recordings by session duration. Short sessions from users who bounced immediately aren’t very useful. Focus on sessions where someone spent at least 30–60 seconds on the page.
  • Combine with conversion data. Hotjar is most useful alongside a tool like Google Analytics or conversion tracking in WordPress — behaviour data and conversion data together tell a much clearer story than either one alone.

Common Mistakes to Avoid

  • Drawing conclusions too early. Heatmaps with fewer than 200–300 sessions are too thin to be reliable. Wait until you have enough data before making changes based on what you see.
  • Not updating your privacy policy. Hotjar collects behavioural data, which means you need to disclose it in your privacy policy and cookie consent setup. Most GDPR consent plugins will handle Hotjar as a third-party tool, but check your configuration.
  • Tracking too many pages at once. Spreading your session recording budget across 20 pages means you’ll get very little data for each. Start with two or three key pages and expand once you’ve acted on the initial findings.
  • Ignoring mobile recordings. A large portion of visitors on most sites are on mobile. Filter your recordings to mobile sessions separately — mobile behaviour often differs significantly from desktop.

Hotjar vs Alternatives

If you’re looking for a free alternative, Microsoft Clarity is worth considering. It offers unlimited recordings and heatmaps at no cost, and it integrates natively with Google Analytics 4. The interface is slightly less polished than Hotjar, but for a site at the early stages, Clarity’s free tier is more generous.

Hotjar’s advantage is in its feedback tools and more refined filtering options, which become valuable as your site grows and you want to run targeted surveys alongside behaviour tracking. For most new WordPress sites, either tool will give you more insight than you’ll have time to act on immediately.

Conclusion

Install Hotjar using the official plugin, set up a heatmap on your most important page, and let it run for at least a week before reviewing the data. Pair what you find with your Google Analytics 4 reports to build a clearer picture of where your site is working and where it isn’t. That combination — behaviour data plus traffic data — is the basis for making improvements that actually move the needle. You can find more about building and improving a website from scratch in the step-by-step guide to building a WordPress website.