|
4 | 4 | <meta charset="UTF-8" /> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
6 | 6 | <!-- Google Tag Manager --> |
7 | | - <!-- Google tag (gtag.js) --> |
8 | | - <script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.googleTagId }}"></script> |
9 | | - <script> |
10 | | - window.dataLayer = window.dataLayer || []; |
11 | | - function gtag() { |
12 | | - dataLayer.push(arguments); |
13 | | - } |
14 | | - gtag("js", new Date()); |
15 | | - |
16 | | - gtag("config", "{{ .Site.Params.googleTagId }}"); |
17 | | - </script> |
| 7 | + <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |
| 8 | + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
| 9 | + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
| 10 | + 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
| 11 | + })(window,document,'script','dataLayer','{{ .Site.Params.googleTagId }}');</script> |
18 | 12 | <!-- End Google Tag Manager --> |
19 | 13 | <title>{{ .Title }} | {{ .Site.Title }}</title> |
20 | 14 | <link rel="icon" href="{{ .Site.Params.favicon | default "/favicon.ico" }}" type="image/x-icon" /> |
|
34 | 28 | </head> |
35 | 29 |
|
36 | 30 | <body id="top" data-ndka-environment="{{ hugo.Environment }}" data-ndka-version="{{ .Site.Params.version | default "v0.0.0" }}"> |
37 | | - <!-- Setting theme here to avoid FOUC --> |
| 31 | + <!-- Google Tag Manager (noscript) --> |
| 32 | +<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.Params.googleTagId }}" |
| 33 | +height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> |
| 34 | +<!-- End Google Tag Manager (noscript) --> |
38 | 35 |
|
39 | 36 | {{ if ne hugo.Environment "production" }} |
40 | 37 | <div class="container-fluid text-center p-2 bg-{{ hugo.Environment }}"> |
|
0 commit comments