aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/googleanalytics.html
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@rgdd.se>2024-05-04 16:44:38 +0200
committerRasmus Dahlberg <rasmus@rgdd.se>2024-05-04 16:44:38 +0200
commit5e46ca558ce13446c092dd9ee6a817837dd3a309 (patch)
tree317ca78f69b42d9c260065f6320aff129bf291ac /layouts/partials/googleanalytics.html
parenta540db08b8049b367f93a423983a3cee7f8bd052 (diff)
Serve dependencies locally to get rid of trackers
Diffstat (limited to 'layouts/partials/googleanalytics.html')
-rw-r--r--layouts/partials/googleanalytics.html18
1 files changed, 0 insertions, 18 deletions
diff --git a/layouts/partials/googleanalytics.html b/layouts/partials/googleanalytics.html
deleted file mode 100644
index 2d72d71..0000000
--- a/layouts/partials/googleanalytics.html
+++ /dev/null
@@ -1,18 +0,0 @@
-{{- $pc := .Site.Config.Privacy.GoogleAnalytics -}}
-{{- if not $pc.Disable }}{{ with .Site.GoogleAnalytics -}}
-<script>
-{{- if not $pc.RespectDoNotTrack -}}
-var doNotTrack = false;
-{{- else -}}
-var dnt = (navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack);
-var doNotTrack = (dnt == "1" || dnt == "yes");
-{{- end -}}
-if (!doNotTrack) {
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', '{{ site.Config.Services.GoogleAnalytics.ID }}');
-}
-</script>
-{{- end -}}
-{{- end -}}