Commit f7ac471b authored by Mathieu Courcelles's avatar Mathieu Courcelles

Changes Piwik to Matomo

parent 2f0f6f01
Pipeline #34676593 passed with stages
......@@ -213,12 +213,12 @@ GRAPPELLI_ADMIN_TITLE = 'CLMSVault - Protein cross-linking mass spectrometry ana
GRAPPELLI_INDEX_DASHBOARD = 'CLMSVault.dashboard.CustomIndexDashboard'
PIWIK_SITEID = os.getenv('PIWIK_SITEID')
PIWIK_URL = os.getenv('PIWIK_URL')
MATOMO_SITEID = os.getenv('MATOMO_SITEID')
MATOMO_URL = os.getenv('MATOMO_URL')
SETTINGS_EXPORT = [
'PIWIK_SITEID',
'PIWIK_URL',
'MATOMO_SITEID',
'MATOMO_URL',
]
CACHES = {
......
......@@ -33,6 +33,8 @@ RUN chown www-data:www-data /usr/src/app \
COPY ./ /usr/src/app/src
# TODO-MC remove
RUN python /usr/src/app/src/manage.py collectstatic --noinput --settings=CLMSVault.settings.base
ARG CI_COMMIT_SHA
ENV GIT_SHA $CI_COMMIT_SHA
......
......@@ -81,23 +81,23 @@
<!-- EXTRAHEAD -->
{% block extrahead %}{% endblock %}
{% if settings.PIWIK_SITEID %}
<!-- Piwik -->
{% if settings.MATOMO_SITEID %}
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="{{ settings.PIWIK_URL }}";
var u="{{ settings.MATOMO_URL }}";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '{{ settings.PIWIK_SITEID }}']);
_paq.push(['setSiteId', '{{ settings.MATOMO_SITEID }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="{{ settings.PIWIK_URL }}piwik.php?idsite={{ settings.PIWIK_SITEID }}&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<noscript><p><img src="{{ settings.MATOMO_URL }}piwik.php?idsite={{ settings.MATOMO_SITEID }}&amp;rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
{% endif %}
</head>
<body class="{% if is_popup %}grp-popup {% endif %}{% block bodyclass %}{% endblock %}{% if LANGUAGE_BIDI %} rtl{% endif %}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment