Adding Hotjar snipped to theme X

Hi,

Would you be able to help me add Hotjar snipped into the Theme X header?

My site is www.formsupreme.com running Wordpress 4.9.8. and Theme X 6.3.8.

Thank you very much :pray:

Hello Yousa,

Thanks for asking. :slight_smile:

  • You can use plugin like Insert Headers and Footers to add script into header section.
  • Another option is to add following code in child theme function.php file:

      function third_party_tracking_code() { ?>
    
        <script>
         
        // Hotjar code.
        </script>
    
      <?php }
    
      add_action( 'wp_head', 'third_party_tracking_code' );  
    

Replace // Hotjar code. with the tracking code.

You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Thanks.

Prasant, you the man! Thanks so much :pray:

Glad we were able to help :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.