Viewing 1 replies (of 1 total)
  • Plugin Author arthur-gareginyan

    (@arthur-gareginyan)

    Hello,

    This plugin is for PHP code when the Google tag manager code is a HTML and JS code. But even so, this plugin accept the Google tag manager code. Just wrap your Google tag manager code in PHP function, like this:

    function google_tag_manager() {
       ?>
    
          <!-- Google Tag Manager -->
          ADD HERE THE GOOGLE TAG MANAGER CODE
          <!-- End Google Tag Manager -->
    
       <?php
    }
    add_action('wp_head', 'google_tag_manager');

    And your code will work.

Viewing 1 replies (of 1 total)
  • The topic ‘Google Tag Manager’ is closed to new replies.