Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #884114
    petermayerla
    Participant

    Hi guys,
    I want to input tracking in my website.
    My tracking provider gave me the tracking js.
    It’s supposed to be here:
    Add it in your CMS

    In this instance you will want to find the file for the footer of your website (in WordPress that is footer.php for example) and place the code above the closing body tag, </body>

    Can you tell me where I can find this in your theme or how you would suggest to do so?

    #884931
    Rad
    Moderator

    Hi there,

    Thanks for posting in.

    Please add this code to your child theme’s functions.php with your tracking code.

    add_action('wp_footer', 'my_tracking_code', 9999);
    
    function my_tracking_code() { ?>
    
    <!--replace this line with your tracking code-->
    
    <?php }

    Hope this helps.

    #898496
    petermayerla
    Participant
    This reply has been marked as private.
    #899065
    Rupok
    Member

    Hi there,

    Thanks for writing back. Your code seems correct and should work. You can also check this plugin that gives more easy option to add custom script to header and footer – https://wordpress.org/plugins/header-and-footer-scripts/

    Hope this helps.

    Cheers!

    #902216
    petermayerla
    Participant
    This reply has been marked as private.
    #902251
    petermayerla
    Participant
    This reply has been marked as private.
    #903028
    Friech
    Moderator

    Glad we could help, Cheers!

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