|
49 | 49 | {{ partial "hooks/head-end.html" . }}
|
50 | 50 | <!--To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled -->
|
51 | 51 | {{ if hugo.IsProduction }}
|
52 |
| -{{ if hasPrefix .Site.GoogleAnalytics "G-"}} |
53 |
| -{{ template "_internal/google_analytics.html" . }} |
54 |
| -{{ else }} |
55 |
| -{{ template "_internal/google_analytics_async.html" . }} |
56 |
| -{{ end }} |
57 |
| - |
58 |
| -<!-- also include GA4 property --> |
59 |
| -<!-- Google tag (gtag.js) --> |
60 |
| -<script async src="https://www.googletagmanager.com/gtag/js?id=G-T6VMPWFRDW"></script> |
61 |
| -<script> |
62 |
| - window.dataLayer = window.dataLayer || []; |
63 |
| - function gtag(){dataLayer.push(arguments);} |
64 |
| - gtag('js', new Date()); |
| 52 | + {{ if hasPrefix .Site.GoogleAnalytics "G-"}} |
| 53 | + {{ template "_internal/google_analytics.html" . }} |
| 54 | + {{ else }} |
| 55 | + {{ template "_internal/google_analytics_async.html" . }} |
| 56 | + {{ end }} |
65 | 57 |
|
66 |
| - gtag('config', 'G-T6VMPWFRDW'); |
67 |
| -</script> |
| 58 | + <!-- Google Tag Manager --> |
| 59 | + <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': |
| 60 | + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
| 61 | + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
| 62 | + 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
| 63 | + })(window,document,'script','dataLayer','GTM-WJJ7VKZ');</script> |
| 64 | + <!-- End Google Tag Manager --> |
68 | 65 |
|
69 | 66 | {{ end }}
|
0 commit comments