[Resolved] Locate a string in my template

Home Forums Support [Resolved] Locate a string in my template

Home Forums Support Locate a string in my template

  • This topic has 5 replies, 2 voices, and was last updated 4 years ago by Tom.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #834986
    cmw

    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-&#8216;,’.js?sv=’);
    </script>

    How can I find this on my GeneratePress template?

    Many thanks.

    GP Premium 1.7.8
    #835008
    Tom
    Lead Developer
    Lead Developer

    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).

    #835067
    cmw

    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.

    #835745
    Tom
    Lead Developer
    Lead Developer

    Which plugin did you deactivate to remove it?

    #838247
    cmw

    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.

    #838261
    Tom
    Lead Developer
    Lead Developer

    The plugin itself is likely adding the code automatically.

    Glad you got it sorted 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.