How to add tracking code to Squarespace on Hotjar
Adding Hotjar tracking to Squarespace involves copying your unique tracking code from Hotjar's dashboard and pasting it into your Squarespace site's header code injection area. This enables heat mapping, session recordings, and user feedback collection on your website.
Prerequisites
- Active Hotjar account
- Admin access to Squarespace website
- Basic understanding of website analytics
- Website already published on Squarespace
Step-by-Step Instructions
Log into your Hotjar account
Copy your Hotjar tracking code
<script> and ends with </script>.Access Squarespace Settings
Open Code Injection settings
Add the tracking code to Header
<script> and closing </script> tags.Save and publish changes
Verify tracking is working
Common Issues & Troubleshooting
Hotjar shows 'No data received' after installation
Wait up to 30 minutes for data to appear. Clear your browser cache and visit your site again. Verify the tracking code was pasted correctly in the Header section, not Footer.
Code Injection option not available in Squarespace
Code Injection requires a paid Squarespace plan. Upgrade from trial or personal plan to Business plan or higher to access this feature.
Tracking code appears as text on website
The code was likely pasted in a content area instead of Code Injection. Remove any visible code from page content and ensure it's only in Settings > Advanced > Code Injection > Header.
Hotjar features not working on all pages
Ensure the tracking code is in the Header section of Code Injection, not in individual page headers. Header code injection applies site-wide automatically to all pages and templates.