Site logo

Archived topic

Locate a string in my template

5 replies · Started by cmw on March 10, 2019

Viewing posts 1–6 of 6

Hi guys,

I got an issue.

It turns out that a few time ago I just pasted a script code for a plugin called Hotjar on my website.

It turns out that I reinstalled it a few time later and it was already activated.

I want to locate that piece of code which is somewhere in the heading of my template because I want to remove it and uninstall this plugin as it makes my website go super slow. Code looks like something like this:

<!-- Hotjar Tracking Code for ZZZ -->
<script>
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:1228724,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>

How can I find this on my GeneratePress template?

Many thanks.

Hi there,

Could it be in your hooks?

If you're using the old hooks, it could be in "Appearance > GP Hooks".

If you're using Elements, it could be in "Appearance > Elements".

If not, it looks like it would be in the header.php file in the parent theme or child theme (if you're using one).

Hey Tom,

Not in any of the 2 mentioned.

I just deactivated the plugin and it does not load anymore.

I am not able to locate the code which is quite strange but it does not affect the performance of my website which is quite fast at GTMetrix so it's fine thanks.

Which plugin did you deactivate to remove it?

Hi Tom,

I meant that I just removed Hotjar plugin and my website was super fast right now.

I think I have that code somewhere but does not affect the site performance.

I reckon I have it somewhere because every time I reinstall the plugin it automatically links to the website and it tells me it is activated without adding the code.

Thanks.

The plugin itself is likely adding the code automatically.

Glad you got it sorted :)

This archived topic is closed to new replies.