Skip to content

Commit b38f867

Browse files
committed
misc: update googleAnalytics
1 parent e16335a commit b38f867

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

layouts/partials/head.html

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@
2121
<link href="{{ .RelPermalink }}" rel="feed" type="{{ .MediaType.Type }}" title="{{ $.Site.Title }}" />
2222
{{ end }}
2323

24-
{{ if .Site.Config.Services.GoogleAnalytics.ID }}
25-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
26-
<script>
27-
window.dataLayer = window.dataLayer || [];
28-
function gtag(){dataLayer.push(arguments)};
29-
gtag('js', new Date());
30-
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
31-
</script>
32-
{{ end }}
24+
{{ template "_internal/google_analytics.html" . }}
3325

3426
{{ if or .Page.Params.math .Site.Params.math }}
3527
<!-- adds MathJax support -->

0 commit comments

Comments
 (0)