Install GTM

I am trying to install Google Tag Manger on my site and found this solution:

add_action('wp_head', 'add_header_code');
function add_header_code(){
?>

    <!-- Add the Google Tag Manager here -->

    <?php
};

Which works but it does not address the GTM code that needs to be injected immediately after the opening <body> tag. Has anyone figure out a way to do this? Thanks!

Hello Devon,

Thanks for writing in!

To setup Google tag manager properly I suggest you to use Google Tag Manager for WordPress plugin. Please take a look at following page to learn more and download plugin:

You can also take a look a following resources to setup Google Tag manager:

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.