Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1188146
    isearchlocal
    Participant

    Hi, i would like to add either a google tracking number code, or google tag manager into one of my websites.

    Do you happen to have a step by step guide as to how i can achieve that using x theme.

    thank you

    #1188147
    isearchlocal
    Participant
    This reply has been marked as private.
    #1188249
    Prasant Rai
    Moderator

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

    Please add following code in child theme’s functions.php file:

    function my_custom_footer_output() {
      ?>
        ... Tag manager code here...
      <?php
    }
    
    add_action( 'wp_footer', 'my_custom_footer_output', 99999 );

    Note: Replace ” … Tag manager code here…” with Google tag manager code.

    Thanks.

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