Hotjar Destination
Hotjar quick info
If you reference Hotjar in the Integrations object, call it “Hotjar”.
Hotjar accepts device-mode data only from Analytics.js.
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 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 | ⬜️ | ⬜️ | ⬜️ |
-
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.
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: 20 Oct 2020
Need support?
Questions? Problems? Need more info? Contact us, and we can help!