diff options
| author | Reorx <novoreorx@gmail.com> | 2022-05-19 16:15:32 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-05-19 16:15:41 +0800 |
| commit | 5c968f59a21c976bc9a636df52bac68dcda38a6b (patch) | |
| tree | 9eb81540cb661cad131642bc5917d352cb9688f7 | |
| parent | ecaf84c7c79c1b4bcf22e19b8b2fd30fbf3489af (diff) | |
support custom analytics
| -rw-r--r-- | layouts/partials/head.html | 7 |
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 */}} |
