Installing a Hotjar plugin for WordPress takes less than five minutes—yet thousands of site owners end up with duplicate tracking tags, broken consent compliance, or cached pages that never fire a single session recording.
The tracking script is only the plumbing. To get reliable heatmaps and session recordings without hurting Core Web Vitals or recording sensitive form inputs, you need clean single-path injection, strict URL exclusions, and consent-aware firing.
Choose One Installation Path Before Adding a Plugin
Here's the catch most tutorials skip: you don't always need a dedicated hotjar plugin for wordpress. Depending on how your site already manages scripts, adding another plugin can duplicate tags or slow down maintenance.
Before installing anything, inspect your site's existing <head> output in DevTools and pick one clean installation path from the table below:
| Installation Method | Best For | Main Trade-off |
|---|---|---|
| Official Hotjar Plugin | Non-technical site owners who want a single Site ID field inside wp-admin. | Adds an extra plugin to keep updated; minimal built-in consent or conditional loading logic. |
| Google Tag Manager (GTM) | Teams already running GA4, ad pixels, and Cookie Consent Mode v2 through GTM. | Requires testing triggers and consent states inside GTM Preview mode. |
| Theme Header / Code Snippet Plugin | Developers using wp_head hooks with custom PHP conditionals (e.g., skipping is_user_logged_in()). |
Must be stored in a child theme or snippet manager so theme updates don't wipe it out. |
If you already manage your tracking stack as outlined in our GA4 guide, deploying Hotjar inside that same tag container keeps script governance in one place.

How to Install and Configure Hotjar on WordPress
Once you've confirmed no legacy Hotjar snippet is lingering in your theme options or GTM container, follow these steps based on Hotjar's official WordPress installation guide:
- Define the page question before enabling site-wide capture.
Write down what you're actually investigating—for example, why visitors abandon a multi-step quote form or ignore a hero call to action. Capturing only targeted high-impact pages saves session quota and cuts third-party script overhead on informational blog posts. - Copy your exact Site ID from Hotjar.
In your Hotjar dashboard under Sites & Organizations, locate the numeric Site ID for the exact live domain (never mix staging and production Site IDs, or test clicks will pollute your heatmaps). - Add the Site ID in WordPress and save.
If using the official Hotjar plugin, go to Plugins → Add New, activate Hotjar, open Settings → Hotjar, paste your Site ID, and save changes. If using a snippet plugin onwp_head, wrap the snippet inif ( ! is_user_logged_in() )so your own editorial edits don't skew scroll maps. - Purge every caching layer immediately.
WordPress page cache and CDN HTML caches serve old<head>markup to logged-out visitors until cleared. Flush your page cache—following the steps in our cache guide—along with any CDN edge cache. - Verify the live tag in an incognito browser.
Open your target URL in a private window, open DevTools → Network, filter byhotjar, and confirmhotjar-<siteid>.jsreturns HTTP200exactly once. Then click Verify Installation inside Hotjar.
Privacy, Consent, and Sensitive Page Exclusions
Think of it this way: a session recording watches everything rendered inside the browser DOM unless you tell Hotjar to suppress it. Running Hotjar blindly across every WordPress route creates real privacy and compliance exposure.
Before letting recordings accumulate, lock down these three areas:
- Gate execution behind your Cookie Consent banner: Under GDPR/UK-GDPR and similar privacy laws, Hotjar's tracking script should only fire after a user opts into analytics/behavior cookies. Map Hotjar to your CMP's analytics category (or Consent Mode trigger in GTM) rather than loading unconditionally on first paint.
- Suppress sensitive inputs on forms: Hotjar masks password and credit card fields automatically, but custom text inputs—like tax IDs, medical notes, or private inquiry details on pages built with tips from our forms comparison—need the
data-hj-suppressattribute or URL-level input masking in Hotjar Settings. - Exclude admin, account, and checkout URLs: Configure Hotjar's URL targeting to exclude
/wp-admin,/my-account,/checkout, and order-confirmation endpoints unless you have a strict, consented UX audit running on checkout.
Turning Heatmaps and Recordings Into Real WordPress Fixes
Visible clicks tell you where visitors hesitated, not why. Combine Hotjar's rage-click and scroll-depth reports with quantitative conversion metrics before touching your theme templates.
Let's look at two common WordPress patterns where Hotjar pays off quickly:
- Dead-click hero carousels: If heatmaps show users repeatedly tapping non-clickable slide headlines or missing tiny pagination dots, audit your carousel layout against our slider guide and replace multi-slide bloat with a single clear CTA block.
- Form field drop-offs and mobile UX breaks: Recordings often reveal mobile sticky headers covering submit buttons or validation error messages scrolling out of view. Once you spot the friction, verify whether the slowdown is a layout bug or third-party JavaScript blocking the main thread.
Speaking of performance: Hotjar loads asynchronously, yet its DOM mutation observer still consumes main-thread CPU during page interaction. Run a before-and-after Lighthouse or WebPageTest check on mobile to verify Interaction to Next Paint (INP) stays healthy after activation.
Frequently Asked Questions
Does the Hotjar plugin for WordPress slow down my site?
The script itself loads asynchronously so it won't block initial HTML parsing, but heavy DOM mutation tracking during user scrolling can add minor main-thread work on low-end mobile devices. Limit recordings to pages you are actively auditing and avoid duplicate installations.
Why isn't Hotjar recording sessions after I installed the plugin?
The three most common culprits are unpurged WordPress/CDN page caches serving old HTML without the script, an ad blocker or browser tracking protection blocking static.hotjar.com during testing, or a cookie consent banner waiting for user opt-in before firing the tag.
Can I use Hotjar without a dedicated WordPress plugin?
Yes. If you already use Google Tag Manager, a header/footer snippet plugin, or a child theme's wp_head hook, adding Hotjar there avoids installing an extra single-purpose plugin while giving you cleaner control over logged-in user exclusions.
