We have a setting in which we collect the Hotjar user ID in Google Tag Manager and then pass it as a custom dimension for Google Analytics. This is done to easily merge and cross-reference both data sources.
We used the following code to write the user ID:
function() {
return hj.property.get('userId');
}
After 2 days, we stopped receiving data, even though there were no changes to the Google Tag Manager, Google Analytics and our Hotjar account.
My suspicion is that at the end of Hotjar there was a system update. I chatted with their technical support, but they could not help me.
It would be great if someone with more experience could look at the following file to find out if there is a way to capture the value of userId:
https://script.hotjar.com/modules-397099a69f05558cbf66f164cffcaf65.js
thank
source
share