Hotjar

Send your event data from RudderStack to Hotjar.

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.

Getting started

RudderStack supports sending event data to Hotjar via the following connection modes:

Connection ModeWebMobileServer
Device modeSupported--
Cloud mode---
info
In a web device mode integration, that is, using JavaScript SDK as a source, the Hotjar native SDK is loaded from 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.

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:
Hotjar connection settings

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");
info
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.

warning
Before you start making identify calls, 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
});

Questions? Contact us by email or on Slack