Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1380248
    powrider686
    Participant

    Hey there,
    I need to add some tracking script to my site henryebarr.com and I am not 100% sure on the best way to do it.

    Here’s what I need to do:

    Insert this code snippet immediately before the </body> tag on every page of your website. It must be included on every landing page, and every page containing a phone number. You can install this script on both HTTP and HTTPS pages.

    Your Code Snippet

    <script type=”text/javascript” src=”//cdn.callrail.com/companies/602806361/bd92fca5904bb6157cfb/12/swap.js”></script>

    How might I achieve that?

    Thanks for the help!

    #1380263
    Rahul
    Moderator

    Hey There,

    The quickest and easiest way to do this is to add it via the Custom section of the Customizer. If you need to implement something a little more robust, this post( https://community.theme.co/forums/topic/editing-header-and-footer/ ) should help you out.

    Thanks!

    #1380267
    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    
    function adding_scripts_to_head(){
       echo '<script type="text/javascript" src="//cdn.callrail.com/companies/602806361/bd92fca5904bb6157cfb/12/swap.js"></script>';
    }
    
    add_action( 'wp_head', 'adding_scripts_to_head', 10 );
    

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1380248 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>