Hotjar Destination

Destination Info
Connection Modes
Device-mode Cloud-mode
Web Web
Mobile Mobile
Server Server

Hotjar enables you to understand your users in a fast and visual way. Hotjar offers a full set of tools such as analytics, page heatmaps, session recordings, feedback tools, and more. Hotjar provides you with everything your team needs to uncover user insights and make the right product changes.

The Segment Hotjar Destination allows you to get started with Hotjar and its core APIs. You can:

  1. Automatically install the Hotjar Tracking Code.
  2. Automatically send user attributes to Hotjar by connecting your Segment identify calls with Hotjar’s own Identify API.
  3. Automatically send custom events to Hotjar by connecting your Segment track calls with Hotjar’s own Events API.

Knowing who your users are and what they’re doing unlocks more advanced filtering and targeting capabilities across all of Hotjar’s tools, helping you find meaningful insights faster.

Getting Started

Before you start, make sure Hotjar supports the source type and connection mode you’ve chosen to implement. You can learn more about connection modes here.

Web Mobile Server
📱 Device-mode ⬜️ ⬜️
☁️ Cloud-mode ⬜️ ⬜️ ⬜️
  1. Navigate to Connections and click Add Destination From the Segment web app.

  2. Search for Hotjar in the Catalog, select it, and choose the JavaScript source you want to connect the destination to.

  3. Add your Hotjar Site ID to your Destination settings. You can find this ID in Account settings > Sites & Organizations.

Your changes will appear in the Segment CDN after 45 minutes, and then Analytics.js will start to asynchronously load Hotjar’s tracking snippet and send data. If you’re already using Hotjar, remove Hotjar’s snippet from your code.


The Hotjar destination will automatically ingest a User ID and any values sent over your Identify spec as traits, as long as session capture is enabled in Hotjar.

Identify calls that do not have a User ID value will not be sent to Hotjar.

Nested values or lists

Currently, the Hotjar Identify API does not support ingesting values passed as nested objects or lists over your identify Spec:

"traits": {
    "name": "Peter Gibbons",
    "email": "",
    "plan": "premium",
    "logins": 5,
    "address": {
      "street": "6th St",
      "city": "San Francisco",
      "state": "CA",
      "postalCode": "94103",
      "country": "USA"

In the example above, Hotjar rejects all the values in the address field.


The Hotjar destination automatically ingests any user actions tracked over your Track spec as events, as long as session capture is enabled in Hotjar.

Event properties

Currently, the Hotjar Events API does not support ingesting event properties:

analytics.track("Experiment Viewed", {
  experiment_id: "1234",
  experiment_name: "new_upsell_UX"
  variation_id: "1234b"
  variation_name: "variant"

In the example above, Hotjar only ingests the event name, Experiment Viewed. All of its event properties are rejected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Setting Description
Site ID
string. This is your site ID for HotJar. It should be a whole number, such as 123456.
IE9 Placeholder Polyfill boolean, defaults to TRUE .

HotJar loads a polyfill for placeholder tags on input fields for IE9. Disable this if you already use a placeholder plugin. This has been deprecated by Hotjar

This page was last modified: 15 Jul 2022

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
Create free account