Available for Observe and Ask with the
,
or
plans. See the Hotjar pricing page for plans and pricing.
In this article, we’ll share an overview of what Events are and how you can use them to go even further with your user insights.
Use Google Tag Manager to send Events to Hotjar
Events can be sent to Hotjar using Google Tag Manager. You'll find a step-by-step guide to setting this up in our article on How to send Events to Hotjar with Google Tag Manager.
What are Events?
As users interact with your site, several things can happen. Users could be clicking buttons, scrolling, or typing. Your site might also be making elements load, errors appear, or page variants to be shown, such as in an A/B test. These occurrences are examples of actions that can be used with Hotjar’s Events feature to help capture specific sessions and filter collected data to improve your insights.
To use Events inside Hotjar, the events taking place on your site will need to be sent from your site to Hotjar through our Events API. This API is available on all pages containing the Hotjar Tracking Code. Some custom JavaScript code will need to be written on your site to start sending events to Hotjar. The custom code might require the involvement of a web developer, depending on your level of technical expertise.
When you’re ready to set up Events, head over to our How to Set Up Events article.
Do not pass Personal Identifying Information as an Event
Personal-identifying information (PII) should never be used as events in Hotjar. If you'd like to connect session data with specific users, you should explore the User Attributes feature instead.
How can Events be used?
Events that you’ve sent to Hotjar using the Event API become available inside Hotjar for:
- Triggering session capture, which impacts Recordings and Heatmaps.
- Triggering Feedback and Surveys to appear based on an event.
- Filtering Recording and Heatmap data by sessions that contained the event.
It is not possible to trigger a Heatmap screenshot based on an event
It isn't possible to trigger a screenshot based on an event, however you can filter Heatmap session data based on an event. When filtering, Hotjar will show data collected from sessions where users triggered the event at some point during their session. This doesn't mean the Heatmap screenshot will be captured at the moment the event fired.
For A/B testing purposes, ensure the event names you're using are unique to the page being tested.
Use Cases
The following are examples of common uses and not an exhaustive list of possibilities.
Recordings and Heatmaps | ||
Event (examples only) |
Use Case |
Goal |
clicked_homepage_cta |
Fire this event when a specific Call To Action (CTA) button is clicked. |
Filter Recordings based on this event and compare the behavior of users who click the CTA with those who do not. |
logged_in |
Fire this event when a user logs in. |
Start session capture only for your logged in users so Recordings and Heatmaps represent these users. |
variant_x |
When a page is being A/B tested, fire the corresponding Event based on which variant is being loaded in the browser. |
Filter Continuous Heatmaps based on each event to compare the performance of each page variant. |
started_chat |
When a web chat widget on your site is opened, fire this event. |
Filter Recording and Heatmap sessions to compare users who used chat with those who didn’t. |
saved_to_wishlist |
Fire this event when a user adds something to their list of saved items. |
Filter Recordings by users who are saving items to compare with those who don’t to discover conversion improvements or opportunities. |
error_occurred |
Fire this event each time your site generates an error on the page. |
Filter your Recordings based on this event, and watch sessions where the user encountered an error, to help find and resolve bugs or common UX issues. |
Feedback and Surveys | ||
Event (examples only) |
Use Case |
Goal |
clicked_unsubscribe |
Fire this event when a user clicks a button on your site that unsubscribes them from a newsletter. |
Trigger a Survey to appear asking how the newsletter could be improved. |
scrolled_to_end |
When a user has scrolled to the end of a page, fire this event. |
Trigger a Feedback widget to appear asking for the user to review the page and leave any suggestions on content that could be included. |