Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1290491
    toddbiala
    Participant

    Sorry if this is repetitive, but i can’t seem to find this exact answer.

    For adding google tag manager – it appears have to add code as high up in the <head> tag as possible as immediately after the opening <body> tag.

    How can i accomplish this? I believe can add the 2 somehow in functions.php but not sure how

    #1290715
    Nico
    Moderator

    Hi There,

    Thanks for writing in.

    You could check this link below on how to setup google tag manager code.

    https://community.theme.co/forums/topic/wherehow-to-install-google-tag-manager-code-using-child-theme/page/2/#post-383014

    Let us know how it goes.

    Thanks.

    #1292193
    toddbiala
    Participant

    That don’t help. GTM says to add 2 codes. That only talks about one. SO not sure

    #1292366
    Lely
    Moderator

    Hello There,

    To add code inside head tag use the one suggested on the previous link. Then to add other code just after the body tag, use the following code:

    
    function add_google_tag_manager_code2(){
    ?>
    
    <!-- Insert Google Tage Code Here -->
    
    <!-- Insert Google Tage Code Here -->
    
    <?php 
    }
    add_action( 'x_before_site_begin', 'add_google_tag_manager_code2' );

    Hope this helps.

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