Segment allows website owners to collect data via an API and send it to hundreds of marketing, analytics and sales tools including Google Analytics, Salesforce, MailChimp, Intercom... and Hotjar!
Hotjar can be added as a Destination in Segment. This allows you to easily install Hotjar, and instantly send customer data over Hotjar's Identify API without you having to add any additional code.
Complete documentation for setting up Hotjar as a Segment Destination is available on the Segment site.
Using Segment's Identify Spec with the Hotjar Identify API
If you're on a Hotjar Business plan, data you collect over Segment's Identify Spec can be sent as User Attributes to Hotjar. This means you don't need to write additional code to send this data over Hotjar's Identify API. By default, User Attributes are disabled in Hotjar.
User Attributes are disabled by default.
Once Hotjar has been added as a Destination in Segment, you should enable User Attributes in Hotjar.
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.
We appreciate this might be a frustrating limitation. Please contact us if you would like to see this, or had feedback about our Segment integration, or Hotjar's User Attributes feature!