Send student data, such as user id, first name, and email address directly to Hotjar's experience insights platform, and receive behavior analytics and feedback data to help improve your training program.
- Note: You will need an active Hotjar account to use this integration. Skilljar doesn't maintain Hotjar. For specific Hotjar product support, please visit their help center.
What is Hotjar?
Hotjar is a third-party analytics tool, which analyzes user behavior from within your Skilljar training platform and provides instant visual feedback to help you see how your students are interacting with your training platform. You can use Hotjar to make informed decisions and identify opportunities to improve the experience for your students.
You can learn more about Hotjar and receive specific product support for their platform via their website.
Installing the Hotjar Tracking Code
To install the Hotjar analytics tool, you'll first need to copy the Javascript code via your Hotjar platform. Your code script should look like this, with the XXXXXXX replaced with your Hotjar ID:
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:XXXXXXX,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>
When you have your code, you'll need to add it to the Analytics Tracking Code Snippet in your Skilljar dashboard’s Theming tab.
- Open your Skilljar dashboard and select Theming on the home page, or expand the Theming header on the left and then select Themes.
- Select the theme you want to manage from the list.
- Scroll down and select the Code Snippets header to expand it.
- Add the above script with your Hotjar ID to the Analytics Tracking Code Snippet box.
- When you're done, select Save and Continue Editing or Save to apply the code.
Tracking Student Information
After you've installed the Hotjar Javascript code, you'll first need to enable user attributes for your website to begin tracking specific student information. Go to the User Attributes page of your Hotjar platform by selecting Settings and then User Attributes, and find the site you want to add user attributes to using the selection dropdown.
Send Student Information: User Id
Identify and track students in Hotjar by their userID by adding the below script to your Analytics Tracking Code Snippet of your Skilljar theme below the general tracking code (see above).
<script>
if (typeof skilljarUser !== 'undefined') {
var userId = skilljarUser.id;
window.hj('identify', userId, {
user_id: userId,
});
}
</script>
Send Student Information: Email and First Name
To track and send a student's email and first name to Hotjar, add the below script to your Analytics Tracking Code Snippet of your Skilljar theme below the general tracking code (see above).
<script>
if (typeof skilljarUser !== 'undefined') {
var userId = skilljarUser.id;
window.hj('identify', userId, {
email: skilljarUser.email,
first_name: skilljarUser.firstName,
});
}
</script>
If you experience any issues and would like to make sure that Hotjar is working as intended, you can enable Hotjar debug logs in your browser console. You can also read more at How To Check That Hotjar is Working article as well.