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 ... -->
|
<!-- hugo doesn't provide extra settings like anonymizeIp ... -->
|
||||||
<script>
|
<script>
|
||||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||||
|
@ -6,3 +7,4 @@
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
</script>
|
</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="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||||
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||||
{{ end }}
|
{{ 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>
|
</head>
|
||||||
|
|
||||||
{{ if .Site.Params.MathJax | default true }}
|
{{ if .Site.Params.MathJax | default true }}
|
||||||
|
|
Loading…
Reference in New Issue