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

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/head_includes.html')
-rw-r--r--layouts/partials/head_includes.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html
index 75ede81..5f79212 100644
--- a/layouts/partials/head_includes.html
+++ b/layouts/partials/head_includes.html
@@ -1,3 +1,12 @@
+<!------------
+ The following logic allows for both the GA4 support using Google Tag Manager and the legacy UA Google Analytics tag
+ to be used together. There may be situations where a organization support both tag methods simultaneously.
+------------->
+<!-- Check for the Global GoogleAnalytics variable to use the Hugo internal google_analytics template -->
+{{ if .Site.GoogleAnalytics }} {{ template "_internal/google_analytics.html" . }} {{ end }}
+<!-- Check for googleAnalytics_UA param to use the google-analytics-ua partial -->
+{{ if .Site.Params.googleAnalytics_UA }} {{ partial "google-analytics-ua.html" . }} {{ end }}
+
{{ if isset $.Site.Params "favicon"}}
<link rel="icon" href="{{ $.Site.Params.favicon | absURL }}">
{{ else }}