DEV Community

Cover image for Integrating Django framework with Matomo web analytics platform
Mikołaj Buchwald
Mikołaj Buchwald

Posted on

Integrating Django framework with Matomo web analytics platform

Recently I wanted to integrate a web application we are working on with Matomo analytics functionalities. Django web framework was used in this application on the backend side. It turned out that there was a package for integrating Matomo with Django -- injecting JavaScript via Django's template mechanism. However, this package was from 2013 (9yo), and it was written for piwik -- the former name of the Matomo.

So I decided to refresh the package and I created django-matomo. The module is available at pip, with:

pip install django-matomo
Enter fullscreen mode Exit fullscreen mode

PyPi website of the package

The source code is available at the django-matomo GitHub repository

I contacted the Matomo Team, and they agreed to update the official support for the integration for Django to django-matomo! It is now listed at their website: https://matomo.org/integrate/

There is also a post I created on Django forums, if anyone have questions regarding the integration on the Django side.


Credits for the django-piwik (legacy package) goes to its creator Raphael Jasjukaitis.

Top comments (0)