Google Tag Manager should be installed before you follow this guide
If you don't have Google Tag Manager installed yet you can find out how in the Google Tag Manager support article about installing it.
Google Tag Manager for advanced users
Click Add a new tag.
Click the tag icon & select Hotjar Tracking Code from the list.
Enter your Hotjar Site ID into the text field.
To get your Hotjar Site ID, look at the URL of your browser while you're logged into Hotjar: http://insights.hotjar.com/sites/**[SITE_ID]**/dashboard.
You can also navigate to your Sites & Organizations list from the Settings menu. From here you will see a listing of the Sites and Organizations you have access to, along with their IDs.
Set up a trigger to control Hotjar.
Once you click in the Triggering area, you can choose what pages the Tracking Code will appear on.
Select All Pages for the trigger.
Single Page Applications should only use the "Page View" trigger type
Google Tag Manager's state change triggers conflict with Hotjar's own system for detecting changes in single page applications. For more information, take a look at the Google Tag Manager article about the Page View trigger.
Save your workspace.
Click the Submit button on the upper right-hand side of the page.
Click on the Publish button to publish the tag.
Keep the Tracking Code in mind when making design changes
If after you install the Tracking Code, your website undergoes a major design change check to ensure your Tracking Code is still installed.
Having trouble installing Hotjar with Google Tag Manager?
Once Your Tracking Code is Installed
You can start using any of Hotjar's 8 features: Heatmaps, Recordings, Forms, Funnels, Polls, Surveys, and Incoming Feedback. Have a look at the guides below to get started.
- Creating Your First Heatmap Report
- How to Start Recordings
- Creating Your First Form Report
- Creating Your First Funnel Report
- Creating Your First Poll
- Creating Your First Survey
- Starting to use Incoming Feedback