Plan availability
For Observe tools (Heatmaps and Recordings): Available on all Observe plans For Observe tools (Heatmaps and Recordings): Observe , Observe
Hotjar's integration with Google Analytics (GA) enables you to drill through your Google Analytics data to see your users' actual experience inside Hotjar. In this article, you'll find use cases and a guide on setting up the two features available with this Google Analytics integration.
- What can I use the Google Analytics integration for?
- Requirements before you start using the integration
- Creating Hotjar Events from Google Analytics Events
- Finding recordings of users identified in Google Analytics
This integration does not support GA implementations through Google Tag Manager
This integration does not support implementations of Google Analytics through Google Tag Manager (GTM) and other tag managers. If GA is being added through GTM, the integration will not work. Google Analytics must be added to your website code directly, not through a tag manager, in order to benefit from this integration.
Common use cases for the Google Analytics integration
The following are some example use cases for the Hotjar Google Analytics integration:
- You identify a behavior change in a Google Analytics user segment, such as an increase in bounce rate or a decrease in conversions. Get a complete understanding of the problem or opportunity by filtering Hotjar Recordings by a user from that Google Analytics segment.
- Enhancing your Google Analytics quantitative data with the related Hotjar Recordings to add support to your hypothesis for a product improvement opportunity.
- Analyze user flows in Hotjar by filtering Recordings with the related Events from Google Analytics, such as GA_started_checkout and GA_didnt_complete_order. Use the filtered recordings to find opportunities to optimize the user journey.
- Use Google Analytics Events to filter Heatmaps to see what's getting clicked on or ignored by users who triggered an event such as GA_cart_abandoned.
- Trigger a Hotjar Survey or Feedback widget when a specific user action fires a Google Analytics event.
Requirements before you start using the integration
Before getting started, be aware of the following:
- An existing GA setup is required. See Google's Get started with Analytics article for help with this.
- If GA is being added through Google Tag Manager, the integration will not work. Google Analytics must be added to your website code directly, not through a tag manager, in order to benefit from this integration.
- Google Analytics Goals are not supported - they featured in Universal Analytics, which was retired on July 1st, 2023.
- This integration only works when events are created in GA. If events are created in GTM or elsewhere and passed to GA, Hotjar will not detect those events.
Universal Analytics (GA3) has been retired.
On July 1, 2023, standard Universal Analytics properties stopped processing data. If you were Universal Analytics, you don't need to change anything in Hotjar to keep this integration working. You can now use the GA4 approaches detailed in this article.
Creating Hotjar Events from Google Analytics Events
Sending Google Analytics Events to Hotjar enables you to:
- Filter Recordings and Heatmaps by Google Analytics Events.
- Target Surveys and Feedback widgets based on Google Analytics Events (In addition to Observe Business or Scale, this feature requires the Ask Plus, Business, or Scale plan)
This integration does not support events that are created in Google Tag Manager or elsewhere
Only Events created and sent through Google Analytics can be recognized by this integration. If events are created in GTM or elsewhere and passed to GA, Hotjar will not detect those events.
With your Site selected on the Hotjar Integrations page, click Connect for Google Analytics if you haven't already done so.
Turn on Automatically create events.
Hotjar will begin capturing Google Analytics Events and attaching them to session data used in Recordings and Heatmaps. You may need to allow some time to pass before captured Google Analytics Events appear in the Hotjar Events filter.
Use GA events in Hotjar to filter session data and target Surveys and Feedback widgets.
Filtering Recordings and Heatmaps by Google Analytics Events
From your Recordings or Heatmaps page, add a new filter and select Event. Then, start typing GA_ followed by the Google Analytics event name to find the relevant event.
Targeting Surveys and Feedback Widgets using Google Analytics Events
In addition to the Observe or
plans required for the Google Analytics integration, the feature to target Surveys and Feedback widgets using Google Analytics events requires an Ask
,
or
plan.
- From the Targeting Settings of your Survey or Feedback widget setup, select Specific Pages.
- Choose Event from the dropdown menu.
- Enter GA_ followed by the Google Analytics Event name as the value for the Event targeting field.
- Click Done and Activate the Survey or Feedback widget.
Find recordings of users identified in Google Analytics
Setting up this feature in Google Analytics
This section covers the initial setup of this feature, which requires some configuration inside Google Analytics. For details on using this feature, see the using this feature section below.
Visit the GA4 Admin page and click Custom definitions.
Click Create custom dimensions and define its properties.
To define the custom dimension properties, enter the following in the New custom dimension overlay:
- Dimension name: hjuid
- Scope: User
- Description: Hotjar User ID
-
User property: hjuid
Select hjuid if it exists. Otherwise, manually type it in.
After entering the custom dimension properties, click Save.
Create a User explorer visualization.
If you don't have a User explorer visualization, you can create one by visiting your Explore page in Google Analytics and clicking on Template gallery. In the Template gallery, select the User explorer template. For further help with creating a User explorer visualization, see the Google Analytics guide on how to create a user explorer page.
Visit your Hotjar Integrations page and enable the Google Analytics integration.
If the Google Analytics integration is not already enabled, visit your Hotjar Integrations page, select your Site from the dropdown menu, then click Connect for Google Analytics.
Enable Automatically share Hotjar user IDs, and click Save.
Using this feature
See our section above covering the initial setup of this feature before trying to use it in Hotjar.
After enabling the GA integration in Hotjar, you may need to wait before following this section
After enabling the Google Analytics integration inside Hotjar, you may need to wait for Google Analytics to receive Hotjar user IDs. If you try to follow the Using this feature section below, before the Hotjar user IDs have been updated in GA, you may not find the detect_user property in the User explorer.
Visit your Google Analytics Explore page, then open the User explorer visualization created earlier.
Open the User activity tab by clicking on one of the GA User Ids in the User explorer 1 tab.
If no results are appearing in the User explorer 1 tab, similar to what is shown below, then you might need to adjust your date range filter.
In the User activity tab, click the detect_user event, then copy the hjuid.
The detect_user event may not be present for all GA User Ids.
Visit your Hotjar Recordings page and click Add filter.
Select the Hotjar user ID filter, then paste the hjuid copied from Google Analytics and click Apply.
This will filter your Recordings list by sessions that Hotjar has captured for the user you've identified from Google Analytics.