From bed5deb97b48bf9c2665df31350d2587e314b019 Mon Sep 17 00:00:00 2001 From: David Slusser Date: Sun, 5 Oct 2025 19:56:35 -0700 Subject: [PATCH] including gtag via env var --- src/django_project/core/settings.py | 2 ++ .../web/templates/web/full/host_info.html | 12 +++++++----- src/django_project/web/templates/web/full/index.html | 12 +++++++----- src/envs/.env.template | 1 + 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/django_project/core/settings.py b/src/django_project/core/settings.py index 9fef477..21fe367 100644 --- a/src/django_project/core/settings.py +++ b/src/django_project/core/settings.py @@ -301,3 +301,5 @@ ) PROJECT_VERSION = env.str("IMAGE_TAG", "0.0.0") PROJECT_SOURCE = "https://github.com/SpokaneTech/SpokanePythonWeb" + +GOOGLE_ANALYTICS_TAG_ID: str | None = env.str("GOOGLE_ANALYTICS_TAG_ID", None) diff --git a/src/django_project/web/templates/web/full/host_info.html b/src/django_project/web/templates/web/full/host_info.html index 7546ac7..2ac97ab 100644 --- a/src/django_project/web/templates/web/full/host_info.html +++ b/src/django_project/web/templates/web/full/host_info.html @@ -4,15 +4,17 @@ + {% if GOOGLE_ANALYTICS_TAG_ID %} - + + {% endif %} + {% if GOOGLE_ANALYTICS_TAG_ID %} - + + {% endif %}