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.

Connection compatibility

Destination info
  • Status: Generally Available
  • Supported sources: Web
  • Refer to it as HOTJAR in the Integrations object.

Connection modes
SourceCloud modeDevice modeHybrid mode
Webnot supportedsupportednot supported
Supported message types
SourceIdentifyPageTrackScreenGroupAlias
Device mode
Websupportedsupportedsupportednot supportednot supportednot supported
info

In the web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Hotjar native SDK from thehttps://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:
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