Hotjar supports tracking across subdomains, however, it cannot track a user session across different top-level domains.
It's possible to track a subdomain without needing additional Hotjar subscriptions by installing the same tracking code from your domain on your subdomain. However, subscription plan limits will then be shared across both the the domain and subdomain. This may mean you'll need to upgrade your Hotjar plan that is now being used across both the domain and subdomain. You can instead treat your subdomain as a separate Hotjar Site with its own tracking code and this will mean additional plan subscriptions. See the Tracking subdomains section below for more details.
A limitation exists for tracking subdomains if session targeting is based on specific page URLs.
If your Site's session targeting criteria includes specific page targets, be sure to read the Limitations section at the bottom of this article.
Domains vs. subdomains
A domain is an easy-to-remember name that’s associated with an IP address on the Internet. It’s the unique name that appears after the @ in email addresses, and after www. in web addresses. Some familiar examples are domains like hotjar.com and google.com.
A subdomain is a secondary domain within a primary domain. Subdomain names will always appear to the left of the primary domain name. The table below has examples of common domains, related subdomains, and other pages/domains that are not related to the domains listed in the first column:
Anything added to the right of the primary domain is not a subdomain. This is just a page within the primary domain.
Tracking domain and subdomains together
To track sessions between a domain and one or more related subdomains, make sure to install the same Tracking Code on each of the related sites. You can find the Hotjar Tracking Code on the Sites & Organizations page by clicking on the View tracking code link next to the Hotjar Site you plan to use.
For help with installing your Tracking Code, check out: How to Install the Hotjar Tracking Code.
Using the same Tracking Code will allow you to collect data from your domain and subdomains in the same Hotjar Site Dashboard and prevent the need to create additional Hotjar Sites for each subdomain.
Using the same Tracking Code on multiple sites will cause your plan limits to be shared.
Sessions from your domain and shared subdomains will count towards your Observe plan's daily session allowance and Ask plan's monthly responses allowance. Consider this when choosing the best Ask/Observe plan to use with your Hotjar Site.
Tracking domain and subdomains separately
If you want to collect data for different subdomains separately, you can add a new Site for each domain/subdomain you plan to track with Hotjar. Then install the unique Tracking Codes from each Hotjar Site to the corresponding website you're tracking.
Installing unique Tracking Codes for each domain/subdomain will separate data collected from your sites across various Hotjar dashboards. To add additional Sites to your Hotjar account, check out How to Add Organizations and Sites.
You can search for Sites and Organizations within your account by using the search bar at the top of your dashboard.
Only admin-level team members have access to add sites
Only team members with admin access can make changes to the setup of your Hotjar account. A full explanation of our team member permissions can be found in our Team Member Permissions article.
Limitations with session targeting
Tracking sessions across top-level domains
Hotjar cannot track across different top-level domains, for example, going from example.com to hotjar.com.
For session capture (Recordings and Heatmaps), a unique identifier allows us to track a user's session across multiple pages. However, due to inherent browser limitations, we are unable to see this identifier when a user moves to a different top-level domain.
If this occurs, the user's Hotjar session will end and a new session will begin (not associated with the previous session).
Tracking sessions across subdomains with page-specific targeting
To ensure the session is tracked across both the domain and subdomain, you will need to alter the Session targeting & tracking settings to include both targets, as in the example below:
For more help with updating the session targeting settings, visit Configuring Site Settings.