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

github.com/themefisher/persian-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuhammad Panji <44004+sumodirjo@users.noreply.github.com>2022-08-28 11:59:45 +0300
committerGitHub <noreply@github.com>2022-08-28 11:59:45 +0300
commitaee6e5fe2754e7f1efc1190863de868f19249e03 (patch)
treeb9f68c1a2c3a7147731b9a4d0f50e228ad6fb028
parent8b556159d7d49da563efdc1e8fca8a7553280233 (diff)
Add Support for Google Analytics 4 (GA4)
-rw-r--r--layouts/partials/head.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 7dafda3..74b68aa 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -37,6 +37,10 @@ AUTHOR WEBSITE: https://themefisher.com
{{ template "_internal/opengraph.html" . }}
<!-- google analytics -->
- {{ template "_internal/google_analytics.html" . }}
+ {{ if hasPrefix .Site.GoogleAnalytics "G-" -}}
+ {{ template "_internal/google_analytics.html" . -}}
+ {{ else -}}
+ {{ template "_internal/google_analytics_async.html" . -}}
+ {{ end -}}
-</head> \ No newline at end of file
+</head>