Learn / Guides / Intro to Hotjar Events
What are Events in Hotjar? (and why you should use them)
Learn how to use Hotjar’s Events for deeper insights based on custom actions unique to your business.
Last updated17 Aug 2022
So you want to find out if users are interacting with features you just introduced. Or maybe you need answers because while your visitors have no problem navigating to the checkout page, they always seem to leave without buying anything.
Frustrations from the lack of sales aside, you know it would benefit your team if you could understand your users better. It would be enlightening—or, at the very least, productive—to learn the cause for the actions they carry out, whether clicking a call-to-action (CTA) button or abandoning your site at checkout.
This is where Hotjar comes in.
Through the Events application programming interface (API), you can connect user actions—also called events—to Hotjar. You can then use events to trigger or filter data on the Hotjar platform’s product experience tools and get even more granular insights.
Does that sound like something you need? Here’s one way to find out. Let’s look at what the Hotjar Events feature is, why you should use it, and how to set it up. This could be your first step toward empathizing with your users more and creating an experience they’ll love.
Find your most relevant insights, fast
Use key user sessions to filter recordings and heatmaps or trigger surveys and feedback. The Hotjar Events feature lets you focus your time on the most important user actions on your site.
Why set up events
Once your events become available inside Hotjar, you can use them to trigger session capture and enhance data filtering for Recordings and Heatmaps. You can also trigger Feedback and Surveys to appear when a custom event fires.
Events are unique to every business, so what’s important to your team may not be as significant to another. Of course, you can track the events that matter to you using analytics tools. Or you can send them to Hotjar for deeper analysis through the Events API—a code you’ll install that allows Hotjar to receive the right data from your chosen source. (We’ll tell you later where and how to install this code.)
Once you send your custom events, Hotjar saves them as Events. Now you can start using them across the platform. Events enable targeting and filtering based on the key user events unique to your product experience. You can use this feature to uncover meaningful user insights by:
Filtering your recordings list and analyzing the most relevant ones
Focusing on the insightful part of a long recording (based on the events overview in the timeline*)
Asking your users for feedback at the very moment they’ve taken an important action
* Events are actions that take place at specific points in time. They’re timestamped and can occur many times throughout the user journey. You can see events represented in the timeline of a recording. In the image below, the lightning bolts each represent an event.
What is an event in Hotjar?
Users carry out a variety of actions on your product or website all the time. These actions are called events. Examples include logging into your app, clicking a CTA, purchasing an item, and encountering an error.
Before we delve further into Events, familiarize yourself with Hotjar’s tools. These tools are used to analyze the behavior of and get feedback from your website users:
Recordings: session recordings are perfect for watching how people interact with your product or website
Heatmaps: this product experience insight tool lets you visualize areas of high activity and inactivity on specific pages of your site
Feedback: remove the guesswork and get visual and instant feedback from users through this tool
Surveys: capture all types of feedback using our on-site or external surveys
Think of Hotjar Events as parameters that tell Hotjar which data to capture. In this way, they direct your time and effort toward users who take specific actions on your product or website. Each event empowers you to glean deeper insights into their behavior. And it can bring you closer to discovering an issue and finding a fix, spotting opportunities for improvement, and filling gaps in your product experience.
Let’s unpack the benefits of setting up events through the Events API:
Trigger session capture
Create an event to start capturing sessions based on an action a user carries out on your site or product. Say you want to capture sessions only for your logged-in users. You set up an event so each time a user logs in, the event passes on to Hotjar and triggers a session capture. You can then find these users represented in Recordings and Heatmaps.
💡Pro tip: a session refers to a series of user interactions taking place within a given time period. The simplest way to understand it is to think of a single visit by a user as one session. It starts from the moment they open your website and ends when they leave or after 30 minutes of inactivity lapse, whichever comes first.
Trigger Feedback and Surveys
You can establish an event so that a survey appears once an action takes place, such as when a user scrolls to the end of a page. So when a user does exactly that, it triggers a survey or feedback widget to show up, asking the user for feedback or suggestions on how to improve the content.
Filter Recording and Heatmap data
Hotjar custom events also help you filter collected Recordings and Heatmap data. For example, perhaps you want to find out why people are not clicking on a CTA button. You can set up an event based on users clicking on the button. After the Events API sends this event to Hotjar, you can then filter recordings by users who have not clicked on your CTA.
Setting up Hotjar Events
Before you can enjoy the targeting and filtering benefits of Events, ensure your site is successfully sending events to Hotjar through the Events API.
You can find the Events feature pre-enabled on your site if you are subscribed to one of the following Observe or Ask plans: Plus, Business, or Scale. However, you will need to add some custom code to your site to start sending events to Hotjar. Writing the additional code may require working with a web developer, depending on your level of technical expertise.
Once you have your Event API code, you can implement it using our Events API Reference Guide.
Note: based on our best practices, 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 Hotjar User Attributes feature instead.
After the custom code implementation is complete, your site will begin sending events to Hotjar, and these will be available for use in our tools. Here are the things you can do with Hotjar events right away:
Filter recordings by events
Filter heatmaps by events
Create a recording segment that includes the filtered event
Target surveys and feedback widgets to trigger based on events
Start session capture based on the triggering of events
Make the most of our platform for product experience insights with Events
With Hotjar Events, you can send events to Hotjar based on actions or changes happening on your site or product, such as clicks, scrolls, typing, and more. Since Recordings and Heatmaps are based on session capture, you can change your settings to start capturing sessions only when an event occurs.
You can also set up event-based targeting for Surveys and Feedback, especially when Hotjar's URL-based targeting rules are not enough.
Using events for Hotjar tool targeting focuses your analysis on specific user actions. You won’t have to waste time watching a long recording—just zone in on the insightful part to streamline your analysis and make decisions with more confidence.
Achieve your product or site goals seamlessly
Let events-based targeting help you analyze user clicks, scrolls, logins, and even exits. This Hotjar feature is an efficient way to understand—and improve—how people experience your product.