Hotjar fully supports cross-domain tracking for subdomains. This means that as long as the same Tracking Code is installed on each of the subdomains you want to track, Hotjar tracking will work as expected. Any page that has the Hotjar Tracking Code installed will be counted towards your average daily pageviews.
Tracking Subdomains in One Account
To set this up, make sure to install the same Tracking Code on all the subdomains you want to track under the same Site in Hotjar.
Tracking Subdomains Separately
If you want to collect data for different subdomains separately, you can install unique Tracking Codes for each site added to your Organization. More information can be found in How to Add Organizations and Sites.
You can toggle between Sites by clicking on the building icon in the top-left corner of your Hotjar dashboard.
Only admin users have access to add sites
Only users with admin access can make changes to the set up of your Hotjar account. A full explanation of our user permissions can be found in User Permissions.
Limitations with Recordings
We currently have a limitation when setting Recordings to start on a specific page and recording cross-domain.
When you set Recordings to start on a specific page, we set a session cookie for the visitor, telling our script to record all subsequent pages. Since session cookies are bound to a domain, we're not able to read the cookie if the domain changes connecting cross-domain Recordings.
The current workarounds we have for this are:
- Remove the page targeting and instead record all pages on your site.
- Add additional domains to the page targeting.
Example of additional domains added
If Recordings start on http://www.example.com/cart/ and that URL then takes the visitor to https://checkout.example.com/, Recordings will start when you hit /cart/, but won't continue on the checkout pages.
You would then need to alter your rules to be:
That results would have Recordings start on the cart page, but also continue on the checkout pages.