summaryrefslogtreecommitdiffstats
path: root/layouts/partials/seo/ga.html
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2024-09-27 20:23:26 +0200
committerGitHub <noreply@github.com>2024-09-27 20:23:26 +0200
commit628b3c2249db280ecb60ec0f8fd8053f88a265e4 (patch)
tree28b485882134deee3a6b1cb78b041c4fe4930f1a /layouts/partials/seo/ga.html
parent96fdcc50bde51af98c8ded2890f4c45c2c801b6e (diff)
downloadgohugo-theme-ed-628b3c2249db280ecb60ec0f8fd8053f88a265e4.tar.gz
Add Google Tag Manager support (#178)
Diffstat (limited to 'layouts/partials/seo/ga.html')
-rw-r--r--layouts/partials/seo/ga.html18
1 files changed, 0 insertions, 18 deletions
diff --git a/layouts/partials/seo/ga.html b/layouts/partials/seo/ga.html
deleted file mode 100644
index 40758d8..0000000
--- a/layouts/partials/seo/ga.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{{- if (or (eq (getenv "HUGO_ENV") "production") (eq site.Params.env "production")) -}}
- {{- with site.GoogleAnalytics -}}
- {{- $gaParams := dict "analyticsCode" (site.GoogleAnalytics | default "") -}}
-
- {{- $gaScript := slice -}}
- {{- $gaScript = $gaScript | append (resources.Get "js/ga.js") -}}
- {{- $gaScript = $gaScript | resources.Concat "js/analytics-bundle.js" -}}
-
- {{- $gaScript = $gaScript | js.Build (dict "format" "iife" "target" "es2015" "minify" true "params" $gaParams) -}}
-
- {{- if site.Params.assets.disable_fingerprinting }}
- <script src="{{ $gaScript.RelPermalink }}"></script>
- {{- else -}}
- {{- $gaScript = $gaScript | fingerprint }}
- <script src="{{ $gaScript.RelPermalink }}" integrity="{{ $gaScript.Data.Integrity }}"></script>
- {{- end -}}
- {{- end -}}
-{{- end -}}