In a website that did not have the hotjar plugin activated, I deleted the hotjar plugin (could have been the hotjar for wordpress plugin).
Seemed okay until I noticed that hotjar script was still loaded. I looked everywhere to find where and what adds the script and other bits but I can't find it in the codes.
Here are the files loading:
304 GET static.hotjar.com hotjar-1716472.js?sv=7 script js mis en cache 3,26 Ko
304 GET script.hotjar.com modules.5366b7bc7306ec7916c3.js script js mis en cache 0 o
GET vars.hotjar.com box-469cf41adb11dc78be68c1ae7f9457a4.html subdocument html 851 o (en compétition) 2,01 Ko
200 OPTIONS in.hotjar.com visit-data?sv=7 xhr octet-stream 362 o 0 o
200 POST in.hotjar.com visit-data?sv=7 xhr json 486 o 169 o
Anyone has a clue about how to find out the code that adds the scripts? The below script is the first to be added after the head tag. No, it is not in the header.php and I searched the files for hotjar and h.hj and found nothing.
<script type="text/javascript" async="" src="https://static.hotjar.com/c/hotjar-1716472.js?sv=7"></script>
Any clue would be appreciated. Thanks!
It could be coming from a few places:
The theme or a plugin
The script-tag could be coded into a template file, called via wp_enqueque_script, or added via another means, by echoing in a callback on the wp_footer hook.
The database
Many WordPress sites have coded saved to a custom-field which is only loaded output on the site by wordpress hooks & filters. The snippet could part of a text-field which has been saved and is then being output without having a corelation between the script tag and the site-code in any way.
that kind of covers it