Skip to content

Commit

Permalink
Matomo : uses new env var
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Sep 27, 2023
1 parent c825448 commit 0a4a54c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lacommunaute/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@
"mandatoryCta": true /* Show the disabled accept button when mandatory on */
});

{% if COMMU_ENVIRONMENT == 'PROD' %}
{% if MATOMO_BASE_URL %}
// Matomo :
tarteaucitron.user.matomoId = 268;
tarteaucitron.user.matomoHost = "https://stats.data.gouv.fr/";
tarteaucitron.user.matomoId = {{ MATOMO_SITE_ID }};
tarteaucitron.user.matomoHost = '{{ MATOMO_BASE_URL }}';
(tarteaucitron.job = tarteaucitron.job || []).push('matomo');
{% endif %}
</script>
Expand Down
3 changes: 3 additions & 0 deletions lacommunaute/utils/settings_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ def expose_settings(request):
"BASE_TEMPLATE": base_template,
"ALLOWED_HOSTS": settings.ALLOWED_HOSTS,
"COMMU_ENVIRONMENT": settings.COMMU_ENVIRONMENT,
"MATOMO_URL": settings.MATOMO_URL,
"MATOMO_SITE_ID": settings.MATOMO_SITE_ID,
"MATOMO_BASE_URL": settings.MATOMO_BASE_URL,
}

0 comments on commit 0a4a54c

Please sign in to comment.