Skip to content

Commit

Permalink
add matomo script and connect it with base template (#320)
Browse files Browse the repository at this point in the history
* add matomo script and connect it with base template

* add django-matomo plugin

* remove manually added script

* update docker requirements

* add matomo to installed apps

* add matomo variables in settings for docker
  • Loading branch information
Akiyamka authored Dec 19, 2023
1 parent 6589e3c commit d27e30b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions REQUIREMENTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ django-user-map
djangorestframework==3.12.2
django-rest-auth==0.9.5
drf-yasg
django-matomo==0.1.6
1 change: 1 addition & 0 deletions dockerize/docker/REQUIREMENTS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ django-rest-multiple-models==2.1.3

django-preferences==1.0.0
PyWavefront==1.3.3
django-matomo==0.1.6
4 changes: 4 additions & 0 deletions qgis-app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
"preferences",
# styles:
"styles",
"matomo"
]

TEMPLATES = [
Expand Down Expand Up @@ -329,3 +330,6 @@
RESULT_BACKEND = BROKER_URL
CELERY_BROKER_URL = BROKER_URL
CELERY_RESULT_BACKEND = CELERY_BROKER_URL

MATOMO_SITE_ID="1"
MATOMO_URL="//matomo.qgis.org/"
4 changes: 4 additions & 0 deletions qgis-app/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
# models (sharing .model3 file feature)
"models",
"wavefronts",
"matomo"
]

DATABASES = {
Expand Down Expand Up @@ -120,3 +121,6 @@
REST_FRAMEWORK = {
"TEST_REQUEST_DEFAULT_FORMAT": "json",
}

MATOMO_SITE_ID="1"
MATOMO_URL="//matomo.qgis.org/"
4 changes: 3 additions & 1 deletion qgis-app/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% load i18n simplemenu_tags static %}
{% load resources_custom_tags %}
{% load matomo_tags %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Expand All @@ -21,7 +22,7 @@

<script type="text/javascript" src="{% static "js/jquery-1.11.1.min.js" %}"></script>
<script type="text/javascript" src="{% static "bootstrap/js/bootstrap-3.4.1.min.js" %}"></script>

<!-- Cookie disclaimer -->
<script type="text/javascript" id="cookieinfo" src="{% static 'js/cookieinfo/cookieinfo.min.js' %}" data-bg="#1c2028"
data-fg="#FFFFFF" data-link="#22961c" data-cookie="CookieInfoScript" data-text-align="left"
Expand Down Expand Up @@ -181,5 +182,6 @@ <h5>Silver Sponsors</h5>
$('#user-tooltip').tooltip('hide');
</script>
<script type="text/javascript" src="{% static 'js/local_timezone.js' %}"></script>
{% tracking_code %}
</body>
</html>

0 comments on commit d27e30b

Please sign in to comment.