Hotjar Destination
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:
- Target Polls and Incoming Feedback to users based on their User Attributes
- Lookup and Delete user data based on their User ID
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 destination is maintained by Segment.
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 | ⬜️ | ⬜️ | ⬜️ |
-
From the Segment web app, click Catalog.
-
Search for “Hotjar” in the Catalog, select it, and choose which of your Javascript sources to connect the destination to.
-
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).
-
Your changes appear in the Segment CDN in about 45 minutes, and then Analytics.js starts asynchronously loading Hotjar’s tracking snippet, along with your Site ID, onto the page. If you are already using Hotjar, remove Hotjar’s snippet from your code.
Hotjar automatically starts 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.
Identify calls that do not have a User ID value will not be sent to 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.
Setting | Description |
---|---|
Site ID (required) |
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. https://docs.hotjar.com/v1.0/docs/disabling-placeholder-polyfill This has been deprecated by Hotjar |
This page was last modified: 21 Jan 2022
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!