For Observe tools (Heatmaps and Recordings): Observe , Observe 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
- Common questions, tips, and help with Hotjar's Google Analytics Integration
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.
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.
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.
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 Plus or BusinessBusiness 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 Observe Observe or Observe 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.
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.
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.
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.
Can I use the integration if Google Analytics is installed through Google Tag Manager?
Unfortunately, when Google Analytics (GA) is loaded via Google Tag Manager (GTM), the Hotjar script can't grab the GA data needed for the integration to work. You will need to add your GA tag directly to your website, rather than via GTM.
For more detail, check out Google's guide on How to add the Google tag directly to your web pages .
Can I use the integration to track events on my Shopify checkout pages?
While Shopify doesn't allow third-party scripts in the checkout, an alternative is to set up Google Analytics events for buttons like "Buy it Now" and "Checkout."
From there, with the Google Analytics Integration, you can use those events in Hotjar's Funnels, Global Filters, and Survey targets. For example, you can set up funnels or filters for users who clicked on the "Checkout" button and made it to the order confirmation page.