Hotjar
2 minute read
Hotjar is a popular behavioral analytics platform, suitable for marketing teams and product managers to better understand and improve their product. It allows them to understand the behavior of their website’s visitors through heat maps, surveys, and conversion funnels.
RudderStack helps you integrate your website with Hotjar to auto-track your user data.
Connection compatibility
| Destination Information | |||
|---|---|---|---|
| |||
In the web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Hotjar native SDK from the
https://static.hotjar.com/domain.Based on your website’s content security policy, you might need to allowlist this domain to load the Hotjar SDK successfully.
Get started
Once you have confirmed that Hotjar supports the source, perform the steps below:
- From your RudderStack dashboard, add the source. Then, select Hotjar from the list of destinations.
- Assign a name to your destination and click Next. You should see the following screen:

Connection settings
To successfully configure Hotjar as a destination in RudderStack, enter the following connection settings:
- Site ID: Enter your Hotjar site ID. You can get your site ID by logging into your Hotjar account and navigating to Settings > Sites & Organizations.
Finally, click Next to complete the configuration. Hotjar will now be added and enabled as a destination in RudderStack.
Track
The track call leverages Hotjar’s Events API to track specific user actions.
A sample track call is as shown below:
rudderanalytics.track("custom_event");To use the Hotjar Events API, you must be on Hotjar’s Plus, Business, or Scale plans.
Identify
The identify call lets you pass your user data to Hotjar, sending them as User Attributes.
Before you start makingidentifycalls, make sure that User Attributes are enabled in your Hotjar dashboard for each site. Refer to this Hotjar support page for more information on enabling and disabling User Attributes.
A sample identify call is shown below:
rudderanalytics.identify("userId", {
total_spend: 500
});