qgis / QGIS-Django

Django project for QGIS related activities such as plugin repository
http://qgis.org
GNU General Public License v2.0
86 stars 59 forks source link

add matomo script and connect it with base template #320

Closed Akiyamka closed 6 months ago

Xpirix commented 7 months ago

Thank you for this work. I tested it locally but I assume that we need to connect to matomo.qgis.org to see if it works.

Besides, I have a few suggestions about the integration of matomo in QGIS-Django:

We could also ask @dimasciput about how the environment variables are implemented in production.

Akiyamka commented 7 months ago

@Xpirix, thanks for the tip to use the plugin, seems like a good idea, I'll try to use it

Akiyamka commented 6 months ago

@Xpirix, I installed motomo-plugin according to its documentation, although I had no luck getting the project to work after installing it. Maybe I'm doing something wrong. Could you please take a look? Below is the error I'm getting

Log ``` TemplateSyntaxError at'matomo_tags' is not a registered tag library. Must be one of: admin_list admin_modify admin_static admin_urls avatar_exists bootstrap_pagination cache flatpages highlight humanize i18n l10n local_timezone log more_like_this plugin_utils plugins_tagcloud range_filter rating_filters ratings resources_custom_tags rest_framework rpctags simplemenu_tags smart_paginate sorl_thumbnail sort_anchor static staticfiles styles_custom_tags taggit_extras thumbnail tz Request Method: | GET -- | -- http://0.0.0.0:62202/ 2.2.25 TemplateSyntaxError 'matomo_tags' is not a registered tag library. /usr/local/lib/python3.7/site-packages/django/template/defaulttags.py in find_library, line 1025 /usr/local/bin/python 3.7.2 ['/home/web/django_project', '/home/web/django_project', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages'] Fri, 8 Dec 2023 11:17:38 -0600 ```

Full log

I have a suspicion that django 2 is too old for this plugin.

Xpirix commented 6 months ago

Hello @Akiyamka , I've checked it locally and had the same error too. Adding matomo to the INSTALLED_APPS in settings_docker.py fixed the error. This is because django is using this file for docker environment. But I think other settings files need also to be updated to avoid the error in different environments.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6589e3c) 81.94% compared to head (729af55) 81.96%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #320 +/- ## ========================================== + Coverage 81.94% 81.96% +0.01% ========================================== Files 139 139 Lines 5418 5422 +4 ========================================== + Hits 4440 4444 +4 Misses 978 978 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Xpirix commented 6 months ago

Looks good to me. Thank you @Akiyamka.

timlinux commented 6 months ago

@dimasciput can you review, merge deploy please?

dimasciput commented 6 months ago

@timlinux @Xpirix before deploying this we probably might need to update the privacy policy.

timlinux commented 6 months ago

@dimasciput can you link to the policy in question?