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

github.com/Vimux/mainroad.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Lomaka <o.lomaka@smartweb.com.ua>2021-04-11 07:56:56 +0300
committerOleg Lomaka <o.lomaka@smartweb.com.ua>2021-04-11 07:56:56 +0300
commit47885bd3ec625fe66bfb2df07d2db0aedd24e692 (patch)
treebd8a709e681440cb8422f1068731bbe9faa584fa
parentf10eb9fbdf06a1e591834b608af13c2d6d21ad18 (diff)
Add support for Google Analytics 4
-rw-r--r--layouts/_default/baseof.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 79bf8bb..f4d4b6d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -37,7 +37,11 @@
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}">
{{- 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">