Segment allows website owners to collect data via an API and send it to hundreds of tools including Hotjar. Hotjar can be added as a Destination in Segment meaning you can use Segment to:
-
Install the Hotjar Tracking code
All the necessary code will be injected into your site via the setup process in Segment. Your Tracking Code will be injected into your site through Segment.
-
Send data to Hotjar using our Events API
Plan availability
For Observe tools (Heatmaps and Recordings): Observe For Observe tools (Heatmaps and Recordings): Observe , Observe
For Ask tools (Surveys): Ask , Ask , AskSegment's Track calls can be automatically forwarded as events to Hotjar through our Events API. We don’t pass any event properties from Segment as Hotjar currently doesn't support them. With our Events API, you can start sending events taking place on your site to Hotjar to help capture specific sessions and filter collected data in Hotjar's tools to improve your insights. For more details, see our article on What Are Events?
-
Send data to Hotjar using our Identify API
Plan availability
For Observe tools (Heatmaps and Recordings): Observe For Observe tools (Heatmaps and Recordings): Observe , Observe
For Ask tools (Surveys): Ask , AskData you collect over Segment's Identify Spec can be sent as User Attributes to Hotjar through our Identify API. User Attributes are facts about your users that are sent to Hotjar. You can use them to filter Recording and Heatmap data, create Segments, or show Surveys only to specific users. See our What Are User Attributes article to learn more.
Hotjar's Identify API cannot store arrays or objects passed to it
Segment's Identify Spec supports the ability to pass nested objects as data values. Unfortunately, Hotjar's Identify API currently does not and will reject these values.
Complete documentation for setting up Hotjar as a Segment Destination is available on the Segment site.*
*In September 2021, Hotjar made a change so that the User Attributes feature is enabled by default if the feature is included in your Hotjar plan. However, the Segment documentation still mentions the need to enable User Attributes; this step can be ignored.