Hotjar Destination


On this page


Hotjar is the fast & visual way to understand your users. It offers a full set of user experience tools: heatmaps, session recordings, forms reporting, funnels, and feedback tools, giving you everything your team needs to uncover user insights and make the right changes.

The Segment Hotjar Destination allows you to both easily install Hotjar on your pages, and send User Attributes information over Hotjar’s Identify API using the Segment Identify Spec. As of February 3rd, 2020, this allows you to:

In time, most or all Hotjar features will use User Attributes in some way, with filtering Recordings planned in the first half of 2020.

This document was last updated on February 6, 2020. This destination is maintained by Segment. If you notice any gaps, outdated information or simply want to leave some feedback to help us improve our documentation, let us know!

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. From your Segment UI’s Destinations page click on “Add Destination”.

  2. Search for “Hotjar” within the Destinations Catalog and confirm the Javascript source you’d like to connect to.

  3. Add your Hotjar Site ID to your Destination settings. You can find this under Settings and Sites & Organizations in your Hotjar dashboard. It should be a whole number (e.g. 123456).

  4. We’ll automatically load Hotjar’s tracking snippet, along with your Site ID, onto the page once analytics.js loads. If you are already using Hotjar, remove Hotjar’s snippet from your code.

  5. Once our CDN updates in 45 minutes, Hotjar will automatically start tracking visitors based on the tools you have enabled in your Hotjar dashboard.

Identify

The Hotjar destination will automatically ingest a User ID, as well as values sent over your Identify spec as traits, as long as User Attributes are enabled in Hotjar.

Nested values or lists

The Hotjar Identify API is unable to ingest values passed as nested objects or lists over your identify Spec:

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

In this example, Hotjar would reject all the values in the address field.

This is a recognized limitation of this version of the Hotjar Identify API, and as of February 3rd, 2020, is in the improvements backlog for the API.

Settings

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

IE9 Placeholder Polyfill

HotJar loads a polyfill for placeholder tags on input fields for IE9. Disable this if you already use a placeholder plugin. https://docs.hotjar.com/v1.0/docs/disabling-placeholder-polyfill

This has been deprecated by Hotjar

Site ID

This is your site ID for HotJar. It should be a whole number, such as 123456.

This page was last modified: 09 Jun 2020

Get started with Segment

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