diff --git a/src/aurora/config/settings.py b/src/aurora/config/settings.py index 8731b892..b9dbeb8d 100644 --- a/src/aurora/config/settings.py +++ b/src/aurora/config/settings.py @@ -842,3 +842,6 @@ def show_ddt(request): # pragma: no-cover AZURE_CLIENT_ID = env("AZURE_CLIENT_ID") AZURE_CLIENT_SECRET = env("AZURE_CLIENT_SECRET") + +MATOMO_SITE = env("MATOMO_SITE", default="https://unisitetracker.unicef.io/") +MATOMO_ID = env("MATOMO_ID", default="N/A") diff --git a/src/aurora/core/templatetags/matomo.py b/src/aurora/core/templatetags/matomo.py new file mode 100644 index 00000000..4fe56917 --- /dev/null +++ b/src/aurora/core/templatetags/matomo.py @@ -0,0 +1,14 @@ +from django.conf import settings +from django.template import Library + +register = Library() + + +@register.simple_tag() +def matomo_site(): + return settings.MATOMO_SITE + + +@register.simple_tag() +def matomo_id(): + return settings.MATOMO_ID diff --git a/src/aurora/web/templates/_footer.html b/src/aurora/web/templates/_footer.html index 50c44220..118f36f2 100644 --- a/src/aurora/web/templates/_footer.html +++ b/src/aurora/web/templates/_footer.html @@ -1,5 +1,7 @@ +{% load matomo %} {% block footer %}
+ {% include "_matomo.html" %} {% endblock footer %} diff --git a/src/aurora/web/templates/_matomo.html b/src/aurora/web/templates/_matomo.html new file mode 100644 index 00000000..7d18f38d --- /dev/null +++ b/src/aurora/web/templates/_matomo.html @@ -0,0 +1,16 @@ +{% load matomo %} + + +