Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1380249
    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!

    Marcus

    #1380273
    Joao
    Moderator

    Hi Marcus,

    This is a double thread.

    Let´s concentrate on > https://community.theme.co/forums/topic/js-tracking-script/

    Thanks

    #1380284
    powrider686
    Participant

    Update: I tried to figure it out and I added this to the functions.php file in my child theme. But when I did the site stopped working :/

    function add_callrail_script() { ?>

    <script type=”text/javascript” src=”//cdn.callrail.com/companies/602806361/bd92fca5904bb6157cfb/12/swap.js”></script>
    <?php }
    add_action( ‘wp_footer’, ‘add_callrail_script’ );

    But then I restored from a backup, readded and it seems to be working. Can you verify that this is the correct way to add this code?

    Thanks for the help!

    #1380339
    Darshana
    Moderator

    Hi there,

    Could you please try the following code that I have updated on your other thread (https://community.theme.co/forums/topic/js-tracking-script/#post-1380267).

    Let us know how it goes.
    Thanks!

    #1380464
    powrider686
    Participant

    Yep for sure. Got it working, thank you! Sorry I didn’t mean to start two threads!

    #1380541
    Nico
    Moderator

    No Worries.

    Feel free to ask us again.

    Thanks.

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