Hotjar Wix integration: how to add the tracking code
Table of Contents
The Hotjar Wix integration works by pasting your Hotjar tracking code into the Custom Code settings of a paid Wix site with a connected domain, placed in the head of all pages. ProfileTree recommends one extra step that most guides skip: set the code type to Analytics so Hotjar waits until each UK visitor has agreed to cookies.
This guide walks through that setup on Wix and Wix Studio, explains what has changed since the Contentsquare merger, lists the Wix features Hotjar cannot record, and covers the checks that confirm everything is working. If you would rather hand the job to a developer, our website development support covers tracking setup and integrations on Wix and WordPress sites.
What you need before connecting Hotjar to Wix
You need a paid Wix plan with your own domain connected, because Hotjar only tracks Wix sites that run on a connected domain, and Custom Code is a paid feature. A site still running on a wixsite.com address will collect nothing, even with the code added correctly.
You also need a Hotjar account with your site added to it, and owner or admin access to the Wix dashboard so you can open the Custom Code settings. Have your cookie banner switched on in Wix before you start. The consent step later in this guide depends on it, and switching it on first means Hotjar never runs on your site without a consent choice behind it.
Hotjar is now part of Contentsquare
Hotjar merged with Contentsquare on 1 July 2025, and new accounts are now created through Contentsquare. Existing users keep their sites and data, but billing and several dashboard labels have moved over to the Contentsquare platform.
For a Wix site owner, the practical effect is small. You still copy a JavaScript snippet (a short piece of code that runs in the visitor’s browser) from your account and paste it into Wix, and Contentsquare’s own Wix guide follows the same Custom Code route. Screenshots in older tutorials, including earlier versions of this page, may show menus that no longer match what you see, so follow the labels on screen if they differ slightly from the wording here.
Adding the Hotjar tracking code in the Wix dashboard
The whole installation happens in the Wix site dashboard, which is the control panel you reach before opening the editor. It takes about five minutes once you have the code copied, and nothing on the page design changes.
Copy the tracking code from your Hotjar account
Log in to Hotjar, open the Sites page and choose the option to install the tracking code for the site you want to measure. Copy the full snippet, from the opening script tag to the closing one, because Wix needs the whole block. Your Site ID (the number Hotjar gives each site) is part of that snippet, so you do not need to copy it separately.
Add the code through Custom Code in Wix
In the site dashboard, open Settings from the left-hand menu, scroll to the Advanced section and select Custom Code. Click Add Custom Code and paste the Hotjar snippet into the text field. Give it a name you will recognise later, such as Hotjar tracking.
Under Add Code to Pages, select All pages. Hotjar recommends this because session tracking (the recording of each visit from page to page) only works properly when the code runs across the whole site. Under Place Code in, select Head, which loads the script near the top of each page.
Before you click Apply, open the Code Type tab and choose Analytics. The next section explains why this setting matters for UK websites. Then click Apply and publish, because the code only goes live on the published version.
Adding the code on a Wix Studio site
Wix Studio, the platform Wix offers to agencies and freelancers, uses the same site dashboard as other Wix sites. Open the dashboard for the site from your Studio workspace, then follow the same route through Settings to Custom Code and use the same choices for pages, placement and code type.
Studio projects are often built by one person and owned by another. Make sure the person adding Hotjar has the right role on the site, and that the Hotjar account belongs to the business and not to whoever built the site, so the data stays with the owner if the developer changes.
Set the code type so Hotjar waits for consent
Wix treats every piece of custom code as Essential unless you tell it otherwise, which means the code loads before a visitor has made any choice on your cookie banner. For a tool that records whole visits, that is the setting to change before anything else.
Why Wix loads custom code before consent by default
Wix’s cookie banner holds back the categories a visitor has not accepted, and it relies on each script being placed in the right category. Choosing Analytics on the Code Type tab tells Wix to run Hotjar only after the visitor accepts analytics cookies. If you added Hotjar some time ago, open the existing entry under Custom Code and check the category, because older installations are usually still set to Essential.
The rules behind this come from the Privacy and Electronic Communications Regulations (PECR), which govern cookies and similar technologies in the UK. The Information Commissioner’s Office (ICO) updated its guidance on storage and access technologies in April 2026, and it now includes a narrow exception for some analytics. That exception only applies where the sole purpose is statistical information about how the site is used, and visitors must still be told and given a free, simple way to object.
Session recordings and on-page surveys go further than counting visits, so holding Hotjar until consent is the safer default for most small business sites. If you plan to use the analytics exception, take advice on your own setup first. We are a web agency and not a law firm, and the decision rests on exactly which Hotjar features you switch on.
When a separate consent tool makes sense
Wix’s built-in banner is enough for most small sites that use Hotjar alongside Wix’s own tools. A separate consent management platform (a cookie tool that scans your pages and blocks scripts by category) is worth considering if you also run Google Tag Manager, several third-party apps or a site with visitors in many countries. Whichever you use, run only one banner, because two banners give visitors conflicting choices and make your records harder to rely on.
Wix pages and apps that Hotjar cannot record
Hotjar cannot collect data from Wix Stores, Wix Forum, Wix Pro Gallery or Wix Events. Hotjar’s own Wix guide lists these as unsupported, so the tracking code on your site will not capture what visitors do inside them.
This matters most for online shops built on Wix Stores. A heatmap of a product page will show the area around the store widget but not the clicks on the add to basket button, and recordings will not follow a visitor through checkout. For shops, pair Hotjar with the sales reports in Wix and a properly configured analytics tool, and read our comparison of Wix Analytics compared with Google Analytics before choosing which one to rely on.
Checking the installation and fixing common errors
Allow a little time after publishing, then open your site’s overview page in Hotjar to confirm that data is arriving. Visit the live site yourself in a fresh browser window, accept the cookie banner and click through two or three pages so there is activity for Hotjar to find.
Most failed installations come down to a short list of causes. Work through them in this order before contacting support.
| What you see | Likely cause | What to do |
|---|---|---|
| Hotjar shows no data at all | The changes were saved but not published, or the site runs on a wixsite.com address | Publish, then confirm a domain is connected to a paid plan |
| No data when you test it yourself | You tested in the editor preview, which does not run custom code | Test on the live domain in a separate browser window |
| No data even on the live site | The code type is Analytics and you declined or ignored the cookie banner | Accept analytics cookies and browse a few pages, then check again |
| Recordings start but stop at the shop | The visitor moved into Wix Stores or another unsupported feature | Use Wix sales reports for checkout behaviour |
| Hotjar reports two tracking codes | Hotjar was added once through an app and again through Custom Code | Remove one installation and keep the Custom Code entry |
To confirm the snippet is on the page, open your live site, right-click, choose to view the page source and search for “hotjar”. If it does not appear, return to Custom Code and confirm the entry is switched on and set to All pages. With the Analytics code type, the script loads only after consent, so accept the banner before you look.
Turning Hotjar data into changes on your Wix site
Installing Hotjar only pays off when someone looks at the results and changes the site. Give it a few weeks on pages that matter to the business, such as a key service page or the contact form, before concluding.
Our guide on how to read Hotjar heatmaps explains each type of map in detail and what it usually means for a page. If Hotjar is one of several tools you run, our article on connecting other apps to Wix covers adding them without slowing pages down.
“A website should be measured before anyone changes it. Put a tool like Hotjar on the pages that bring in enquiries, let visitors show you where they get stuck, and then fix what is holding the site back. Most of the damage I have seen done to business websites in Belfast came from changes that nobody measured, which is why ProfileTree measures every website development project before and after,” says Ciaran Connolly, founder of ProfileTree.
Keeping Hotjar from slowing down your Wix site
Hotjar adds one more script to every page, but its effect on how soon visitors can use a page is small, and the higher cost usually comes from stacking several tracking tools together. In Hotjar’s own speed test, a sample page became interactive at about 0.4 seconds with or without the tracking code, while full loading moved from about 1 second to just under 1.3 seconds.
Hotjar puts most of that gap down to the script sending data back after the page has already appeared, which speed testing tools still count as load time. That is why Google’s free PageSpeed test can report a slower page after you install Hotjar even when visitors notice no difference. Before removing anything, compare it with the Core Web Vitals report in Google Search Console, which measures loading, responsiveness and layout stability for real visitors.
The useful controls sit in Hotjar’s site settings. Keep the Wix snippet on all pages, as Hotjar recommends, and use session targeting to capture visits that reach the pages you care about, such as a key service page or the contact form, where your plan includes URL targeting. This does not remove the script from other pages, but it spends your session allowance where enquiries are won or lost. Block your own office IP address as well, so recordings of your team checking the site do not crowd out real visitors.
Wix sites tend to collect apps and tracking tags over the years, and each one adds weight. Remove the ones nobody reads before adding Hotjar. One behaviour tool is enough for a typical small business site, and running two side by side doubles the script weight without doubling what you learn.
Hotjar or Microsoft Clarity for a Wix site
Microsoft Clarity is a free alternative listed in the Wix App Market, and for a site that only needs heatmaps and recordings, it covers the basics at no cost. Hotjar is the better fit when you also want on-page surveys and feedback widgets, which now sit in Contentsquare’s Voice of Customer product, or when your team already uses Contentsquare on another site.
Clarity installs from the Wix App Market and, like Hotjar, only works on a Wix site with a registered domain. It masks sensitive content by default and keeps recordings for 30 days unless you mark them as favourites, which extends storage to 13 months. Microsoft also states that Clarity should not be used on websites aimed at under 18s, which rules it out for schools and youth organisations.
| Point to compare | Hotjar in Custom Code | Microsoft Clarity from the Wix App Market |
|---|---|---|
| Cost | Free plan, with paid plans through Contentsquare | Free |
| How it is added | Snippet pasted into Custom Code | App added from the App Market |
| Consent control in Wix | Code type set to Analytics | Check the app’s own consent settings |
| Recording storage | Depends on the plan | 30 days, or 13 months for favourites |
The consent position is the difference that matters most for UK sites. Hotjar added through Custom Code can sit in the Analytics category, so Wix’s banner controls it directly. Wix says it cannot guarantee that apps from other developers are blocked before consent, so if you choose Clarity, check its consent settings and test the site with the banner declined before you depend on it.
Getting help with a Wix site that needs to convert
If the setup above feels like more than you want to take on, or the data shows problems you are not sure how to fix, ProfileTree can do both parts. ProfileTree is a Belfast web design and digital marketing agency, founded in 2011 and based at the McSweeney Centre, with more than 500 Google reviews and a 5.0 rating.
We add and check tracking as part of our website development work, which is charged by the hour, and a neglected site typically needs £800 to £2,000 plus VAT to put right. New Wix or Squarespace websites start from £1,500 plus VAT. Where the question is what to do with the data, our digital strategy team turns Hotjar findings into a plan for the pages that bring in enquiries, and anyone handling visitor data can read our guide to GDPR for business websites alongside it.
FAQs
Can I use Hotjar on a free Wix site?
No. Hotjar needs your own domain connected to the site, and the Custom Code area that holds the snippet comes only with paid Wix plans. You can create your Hotjar account in advance so the snippet is ready, then add it once the upgrade is done.
Does Hotjar work with Wix Stores and Wix Events?
No, Hotjar cannot collect data from Wix Stores, Wix Events, Wix Forum or Wix Pro Gallery. It will still record the rest of each page, but not what visitors do inside those features. For shop and booking behaviour, use the reports inside Wix alongside your analytics tool.
Do I need cookie consent before Hotjar runs on a UK website?
In most cases, you should treat Hotjar as needing consent, and setting its code type to Analytics in Wix does that for you. The ICO’s 2026 guidance allows a narrow exception for some statistical analytics, but it applies only where that is the sole purpose, and visitors can object. Session recordings and surveys go beyond that, so get advice before you depend on it.
Why does Hotjar say the tracking code is not detected on my Wix site?
The usual reasons are that the site was not published after the code was added, that you tested in the editor preview, or that the cookie banner blocked the script because you had not accepted analytics cookies. Publish your changes, visit the live domain and accept the banner, then check Hotjar again after a short wait.