diff --git a/app/config.py b/app/config.py index 4b6444b..62d863c 100644 --- a/app/config.py +++ b/app/config.py @@ -110,6 +110,7 @@ class Config(pydantic.BaseModel): custom_footer: str | None = None emoji: str | None = None also_known_as: str | None = None + ga_analytics: str | None = None hides_followers: bool = False hides_following: bool = False diff --git a/app/templates.py b/app/templates.py index 34b7f57..028a693 100644 --- a/app/templates.py +++ b/app/templates.py @@ -434,6 +434,7 @@ _templates.env.globals["JS_HASH"] = config.JS_HASH _templates.env.globals["CSS_HASH"] = config.CSS_HASH _templates.env.globals["BASE_URL"] = config.BASE_URL _templates.env.globals["TAGS"] = config.CONFIG.tags +_templates.env.globals["GA_ANALYTICS"] = config.CONFIG.ga_analytics _templates.env.globals["HIDES_FOLLOWERS"] = config.HIDES_FOLLOWERS _templates.env.globals["HIDES_FOLLOWING"] = config.HIDES_FOLLOWING _templates.env.globals["NAVBAR_ITEMS"] = config.NavBarItems diff --git a/app/templates/layout.html b/app/templates/layout.html index 0f7774d..3a58e30 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -1,6 +1,17 @@
+{% if GA_ANALYTICS %} + + + +{% endif %}