Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mismith0227/hugo_theme_pickles.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Thomas <jeffdthomas@gmail.com>2021-11-30 07:17:04 +0300
committerJeff Thomas <jeffdthomas@gmail.com>2021-11-30 07:17:04 +0300
commitd53565fb10b503c200536553e90fa8e4223fd1f4 (patch)
treebdffefd2a9ce3706b42fcd29f165640e920f1889
parentd243af0c3ab8a194d4829814636019a6eff78345 (diff)
Add support for google analytics 4
-rw-r--r--layouts/partials/head.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 917fefb..6769b64 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -40,7 +40,11 @@
{{ hugo.Generator -}}
{{ if not .Site.IsServer }}
- {{ template "_internal/google_analytics_async.html" . }}
+ {{ if hasPrefix .Site.GoogleAnalytics "G-"}}
+ {{ template "_internal/google_analytics.html" . }}
+ {{ else }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
{{ end }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css" />