This article provides instructions on how to install Hotjar on your Squarespace site and also offers a workaround for tracking Squarespace checkout conversions.
How to install Hotjar on your Squarespace site
To see if you are on Squarespace premium plan, head to their support document Premium Squarespace plans.
Go to hotjar.com to copy the Tracking Code from the Hotjar admin.
Click on Settings in your Squarespace dashboard.
Navigate to Advanced > Code Injection.
Paste the Hotjar Tracking Code in the Header section text area.
Don't forget to click Save before closing the window.
Your Hotjar Tracking Code is now installed
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 Tracking Code on it - you can visit the page yourself to speed the process up. Once Hotjar has detected the Tracking Code on your site, the Site Dashboard will show a notice like the one below:
Keep your Hotjar Tracking Code in mind when making design changes on your site
If your website undergoes a major design change after you've installed the Tracking Code, check to ensure your Tracking Code is still installed.
How to record the Squarespace checkout flow
Unfortunately, Squarespace does not offer the ability to add third-party scripts to their checkout pages. However, below are some possible workarounds for tracking conversions in Hotjar:
Track the confirmation page
While you can't track the checkout flow in Squarespace, you can track your confirmation page. This means you can see sessions from users who made a purchase by filtering Recordings based on the confirmation page URL for your site (e.g. they visited the page that contains /order-confirmed).
Note: We recommend that you double-check the confirmation page URL on your live website, to ensure that your filter criteria matches your site's confirmation page URL. If it doesn't, you may need to filter by something other than "/order-confirmed" to see the desired sessions.
Add event triggers
If you're interested in comparing users who made a purchase versus those who began the checkout process, but didn't finish it, you can explore adding Event triggers to the buttons on your site that would take users to the checkout page. Then filter the Recordings based on your events, to compare the following segments of users:
- Users that clicked the buttons and reached the order confirmation page.
- Users that clicked the buttons and did not reach the order confirmation page.