summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-05-19 16:15:32 +0800
committerReorx <novoreorx@gmail.com>2022-05-19 16:15:41 +0800
commit5c968f59a21c976bc9a636df52bac68dcda38a6b (patch)
tree9eb81540cb661cad131642bc5917d352cb9688f7
parentecaf84c7c79c1b4bcf22e19b8b2fd30fbf3489af (diff)
support custom analytics
-rw-r--r--layouts/partials/head.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 9b50504..e7c02b3 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -72,7 +72,12 @@
{{- /* Misc */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
-{{- template "_internal/google_analytics.html" . }}
+ {{- if site.GoogleAnalytics }}
+ {{- template "_internal/google_analytics.html" . }}
+ {{- end -}}
+ {{- if site.Params.useCustomAnalytics }}
+ {{- partialCached "custom_analytics.html" . "custom_analytics.html" }}
+ {{- end -}}
{{- end -}}
{{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}}