Commit 36d918023ce6bb878c38e3ab53508a3facb5b893
1 parent
627baba0
google tag manager
Showing
1 changed file
with
11 additions
and
1 deletions
 
Show diff stats
frontend/views/layouts/main.php
| ... | ... | @@ -93,7 +93,13 @@ JS; | 
| 93 | 93 | <link type="image/x-icon" href="/img/favicon.ico" rel="icon"> | 
| 94 | 94 | <title><?= Html::encode($seo->title) ?></title> | 
| 95 | 95 | <?php $this->head() ?> | 
| 96 | - | |
| 96 | + <!-- Google Tag Manager --> | |
| 97 | + <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
| 98 | + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
| 99 | + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
| 100 | + 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
| 101 | + })(window,document,'script','dataLayer','GTM-M6MFXLM');</script> | |
| 102 | + <!-- End Google Tag Manager --> | |
| 97 | 103 | <!-- Google Analytics --> | 
| 98 | 104 | <?php if (!empty($settings->ga_code)) { ?> | 
| 99 | 105 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-109405172-1"></script> | 
| ... | ... | @@ -108,6 +114,10 @@ JS; | 
| 108 | 114 | </head> | 
| 109 | 115 | <body> | 
| 110 | 116 | <?php $this->beginBody() ?> | 
| 117 | + <!-- Google Tag Manager (noscript) --> | |
| 118 | + <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M6MFXLM" | |
| 119 | + height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | |
| 120 | + <!-- End Google Tag Manager (noscript) --> | |
| 111 | 121 | <div id="all"> | 
| 112 | 122 | <header> | 
| 113 | 123 | <!-- *** TOP *** | ... | ... | 
