remove duplicate gtag manager tracker
This commit is contained in:
parent
9f6dc066e1
commit
554aa6f2b9
|
@ -1,3 +1,4 @@
|
|||
{{ if .Site.GoogleAnalytics }}
|
||||
<!-- hugo doesn't provide extra settings like anonymizeIp ... -->
|
||||
<script>
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
|
@ -5,4 +6,5 @@
|
|||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<script async src='//www.google-analytics.com/analytics.js'></script>
|
||||
<script async src='//www.google-analytics.com/analytics.js'></script>
|
||||
{{ end }}
|
|
@ -13,18 +13,6 @@
|
|||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
<!-- Global Site Tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments)};
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
||||
</script>
|
||||
{{ end }}
|
||||
</head>
|
||||
|
||||
{{ if .Site.Params.MathJax | default true }}
|
||||
|
|
Loading…
Reference in New Issue