Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1402923
    Frankonedesign
    Participant

    Hello, I have another request:

    I would like to install the Google Tag Manager in my CHILD-THEME. I do not know the best way at the moment!
    The GTM code should be placed after the opening body-tag.

    What exactly is the best way to do this without having to work with a plugin?

    HOME

    Please explain it to me slowly and accurately, step by step, so that everything works perfectly – as always. Thank you
    Frank

    #1402938
    Friech
    Moderator

    Hi Frank,

    Thank you for writing in! Please copy the code below on a text editor first (sublime, notepad, notepad++, etc.)

     add_action( 'x_before_site_begin', 'google_tag_manager' );
    function google_tag_manager() { ?>
    
    <!-- PASTE YOUR GOOGLE TAG MANAGER CODE HERE -->
    
    <?php }

    Paste your google tag script where it says <!– PASTE YOUR GOOGLE TAG MANAGER CODE HERE –>

    Then paste the final code on your child theme’s functions.php file. You can locate the child theme’s functions.php file on this directory /wp-content/themes/x-child/. We recommend you edit this file via FTP or cPanel (not from Dashboard > Appearance > Editor).

    Let us know how it goes.

    Cheers!

    #1403000
    Frankonedesign
    Participant

    Hello, thank you. It´s allright – it´s running

    #1403016
    Thai
    Moderator

    If you need anything else please let us know.

    #1403057
    Frankonedesign
    Participant

    Well, now there is an another problem with the google tag manager. The google tag manager is suddenly in the browser window of safari always open. Please look at the image. Also the GTM is in the backend of WordPress.

    #1403060
    Frankonedesign
    Participant

    Here is the image

    #1403069
    Frankonedesign
    Participant

    Hello,

    now is the GTM in the browser window of safari gone.

    It seams that’s alright.

    Thank you

    #1403073
    Frankonedesign
    Participant

    Now the GTM is no longer in the browser window of Safari and also no longer in the backend of WordPress. It’s all right now.

    Thank You

    #1403369
    Rue Nel
    Moderator

    Hello There,

    We are just glad that you have figured it out a way to correct the said issue.
    Thanks for letting us know!

    Best Regards.

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