gtag
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
1 changed file
with
16 additions
and
1 deletions
| ... | @@ -17,6 +17,15 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); | ... | @@ -17,6 +17,15 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); |
| 17 | <html <?php language_attributes(); ?>> | 17 | <html <?php language_attributes(); ?>> |
| 18 | <head> | 18 | <head> |
| 19 | <meta charset="<?php bloginfo( 'charset' ); ?>"> | 19 | <meta charset="<?php bloginfo( 'charset' ); ?>"> |
| 20 | <?php if(is_user_logged_in()) { ?> | ||
| 21 | <!-- Google Tag Manager --> | ||
| 22 | <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
| 23 | new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
| 24 | j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
| 25 | 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
| 26 | })(window,document,'script','dataLayer','GTM-TFSKBLV');</script> | ||
| 27 | <!-- End Google Tag Manager --> | ||
| 28 | <?php } ?> | ||
| 20 | 29 | ||
| 21 | <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> | 30 | <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> |
| 22 | <link rel="profile" href="http://gmpg.org/xfn/11"> | 31 | <link rel="profile" href="http://gmpg.org/xfn/11"> |
| ... | @@ -25,6 +34,12 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); | ... | @@ -25,6 +34,12 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); |
| 25 | 34 | ||
| 26 | <body <?php body_class(); ?> <?php understrap_body_attributes(); ?>> | 35 | <body <?php body_class(); ?> <?php understrap_body_attributes(); ?>> |
| 27 | <?php do_action( 'wp_body_open' ); ?> | 36 | <?php do_action( 'wp_body_open' ); ?> |
| 37 | <?php if(is_user_logged_in()) { ?> | ||
| 38 | <!-- Google Tag Manager (noscript) --> | ||
| 39 | <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TFSKBLV" | ||
| 40 | height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
| 41 | <!-- End Google Tag Manager (noscript) --> | ||
| 42 | <?php } ?> | ||
| 28 | <div class="site" id="page"> | 43 | <div class="site" id="page"> |
| 29 | <?php if (! is_page('login')) { ?> | 44 | <?php if (! is_page('login')) { ?> |
| 30 | <!-- ******************* The Navbar Area ******************* --> | 45 | <!-- ******************* The Navbar Area ******************* --> |
| ... | @@ -51,4 +66,4 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); | ... | @@ -51,4 +66,4 @@ $navbar_type = get_theme_mod( 'understrap_navbar_type', 'collapse' ); |
| 51 | <?php get_template_part( 'global-templates/navbar', $navbar_type . '-' . $bootstrap_version ); ?> | 66 | <?php get_template_part( 'global-templates/navbar', $navbar_type . '-' . $bootstrap_version ); ?> |
| 52 | 67 | ||
| 53 | </header><!-- #wrapper-navbar --> | 68 | </header><!-- #wrapper-navbar --> |
| 54 | <?php } ?> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 69 | <?php } ?> | ... | ... |
-
Please register or sign in to post a comment