From c0f812a15504f34e4aa792892841b800f07182bc Mon Sep 17 00:00:00 2001 From: mifi Date: Sat, 31 Jan 2026 21:50:34 -0300 Subject: [PATCH] GA changes to allow functionality with strict CSP --- docker-compose.yml | 5 +++-- site/assets/js/ga-init.js | 8 ++++++++ site/index.html | 8 +------- 3 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 site/assets/js/ga-init.js diff --git a/docker-compose.yml b/docker-compose.yml index e160511..72ffb8e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,8 @@ services: pull_policy: always restart: unless-stopped healthcheck: - test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"] + test: + ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://127.0.0.1/"] interval: 30s timeout: 3s start_period: 5s @@ -20,7 +21,7 @@ services: - "traefik.docker.network=marina-net" - "traefik.http.routers.mifiventures.rule=Host(`mifi.ventures`) || Host(`www.mifi.ventures`)" - "traefik.http.routers.mifiventures.entrypoints=websecure" - - "traefik.http.routers.mifiventures.middlewares=secure-all@file,redirect-www-to-non-www@file" + - "traefik.http.routers.mifiventures.middlewares=security-supermax-with-analytics@file,redirect-www-to-non-www@file" - "traefik.http.routers.mifiventures.tls=true" - "traefik.http.routers.mifiventures.tls.certresolver=letsencrypt" networks: diff --git a/site/assets/js/ga-init.js b/site/assets/js/ga-init.js new file mode 100644 index 0000000..5e66bd2 --- /dev/null +++ b/site/assets/js/ga-init.js @@ -0,0 +1,8 @@ +window.dataLayer = window.dataLayer || []; +function gtag(){ window.dataLayer.push(arguments); } + +gtag("js", new Date()); +gtag("config", "G-36F29PDKRT", { + // optional, but often helpful: + anonymize_ip: true, +}); diff --git a/site/index.html b/site/index.html index 6dddecb..275983e 100644 --- a/site/index.html +++ b/site/index.html @@ -3,13 +3,7 @@ - +