2

I installed hotjar tracking to my site through my google tag. Now I want to remove it.

I have disabled all tracking on my hotjar account. I have deleted the tag (AUTO Hotjar Tracking Code) in google tag manager. Everything should be fine I think.. BUT! When I run a audit here https://web.dev/measure/ I get a suggestion to remove "unused js" where one of the suggested third party javascripts to remove is: "/modules.7d6d031….js(script.hotjar.com)"

I searched my code for anything 'hotjar' but gets nothing... what am I missing. Why and how is it loading the hotjar javascript? How can I nuke it from orbit?

1 Answer 1

3
  1. Download your GTM container as json and look there for hotjar. Get rid of it, publish the container, check again.
  2. Go to the network tab, and find the offending script. You're not supposed to end your debugging on a third party tool. Network tab is a great place to continue. Now block GTM through devtools request blocking, hard reload the page and confirm that the script doesn't load anymore. If it still loads - it's not GTM, it's something else.
  3. It still loads through GTM after all this? Now the chance for it is slim. But! Inspect that network request, it's likely a redirect destination from a different request, try to find where it's from, and "nuke" the origination.
  4. Didn't help? Ok, no, there can still be a case of some obfuscation on the part of hotjar, and there are things one could do to fish it out, but I really doubt it's the case.

Let us know how your debugging goes if this is not enough to eliminate the script.

2
  • 1
    🤦 Apparently you have to submit your changes to google tag manager for them to take effect... Feb 27 at 20:52
  • Yes, you have to publish every time for changes to appear on your target environment..
    – BNazaruk
    Feb 27 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.