Add support for Google Analytics v4
Hugo 0.82.0+ is required if you want to use Google Analytics v4
This commit is contained in:
parent
ac6004e5ad
commit
2456799f6d
1 changed files with 4 additions and 0 deletions
|
@ -37,8 +37,12 @@
|
|||
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
|
||||
{{- end }}
|
||||
{{- if not .Site.IsServer }}
|
||||
{{- if hasPrefix .Site.GoogleAnalytics "G-" }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{- else }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
</head>
|
||||
<body class="body kind-{{ .Kind }}">
|
||||
{{ partial "header" . }}
|
||||
|
|
Loading…
Reference in a new issue