diff --git a/impl/ui_common.py b/impl/ui_common.py index 18af5cd10..e5e872451 100644 --- a/impl/ui_common.py +++ b/impl/ui_common.py @@ -40,6 +40,8 @@ def render(request, template, context={}): "feed_cache": [], # ezidapp.management.commands.newsfeed.getLatestItems(), "google_analytics_id": django.conf.settings.GOOGLE_ANALYTICS_ID, "debug": django.conf.settings.DEBUG, + "matomo_site_url": django.conf.settings.MATOMO_SITE_URL, + "matomo_site_id": django.conf.settings.MATOMO_SITE_ID, } ctx.update(context) templ = django.template.loader.get_template(f'{template}.html') @@ -140,6 +142,8 @@ def error(request, code, content_custom=None): "feed_cache": [], # ezidapp.management.commands.newsfeed.getLatestItems(), "google_analytics_id": django.conf.settings.GOOGLE_ANALYTICS_ID, "content_custom": content_custom, + "matomo_site_url": django.conf.settings.MATOMO_SITE_URL, + "matomo_site_id": django.conf.settings.MATOMO_SITE_ID, } # TODO: Remove this temporary workaround and modify dynamically generated HTML # instead. diff --git a/settings/settings.py.j2 b/settings/settings.py.j2 index d56c38eb2..f903e80f2 100644 --- a/settings/settings.py.j2 +++ b/settings/settings.py.j2 @@ -380,6 +380,9 @@ ADMIN_GROUP_PID = '{{ admin_search_group_pid }}' GOOGLE_ANALYTICS_ID = None +MATOMO_SITE_ID = 21 +MATOMO_SITE_URL = 'https://matomo.cdlib.org/' + GZIP_COMMAND = '/usr/bin/gzip' ZIP_COMMAND = '/usr/bin/zip' diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 568b7bc40..7c5b7cc29 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -65,6 +65,24 @@ {% endfor %} {% endif %} {% endif %} + + + + +