adding google tracking code to the theme in the header and the footer
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 1 May 2017 12:01:18 +0000 (08:01 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 1 May 2017 12:01:18 +0000 (08:01 -0400)
first part of the google tracking code was added to the head tag the second part of
the google tracking code , as specified by the email, was put in the footer at the end
of the body tag

footer.php
header.php

index cf85626..c855852 100644 (file)
         </div><!--End of inner-wrap-->
       </div><!--End of off-canvas-->
   <?php wp_footer();?>
+<!-- Google Tag Manager (noscript) -->
+<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NF27NGN"
+height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<!-- End Google Tag Manager (noscript) --> 
 <!-- Conversion Pixel - JRC 5906 - //www.mountpleasantwow.com/ - DO NOT MODIFY -->
 <script src="//ib.adnxs.com/px?id=169990&t=1" type="text/javascript"></script>
 <!-- End of Conversion Pixel -->
index 5d29496..ecb446b 100644 (file)
         <img height="1" width="1" src="https://www.facebook.com/tr?id=1690921537794421&ev=PageView&noscript=1"/>
     </noscript>
     <!-- End Facebook Pixel Code -->
+    <!-- Google Tag Manager -->
+    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+    })(window,document,'script','dataLayer','GTM-NF27NGN');</script>
+    <!-- End Google Tag Manager -->
     <?php wp_head(); ?>
   </head>
   <body data-grid-framework="f4" data-grid-color="blue" data-grid-opacity="0.5" data-grid-zindex="10" data-grid-gutterwidth="30px" data-grid-nbcols="16">