Django app to track webtraffic serverside with Matomo API
Project description
Django Matomo API Tracking
This django app enables server side traffic tracking. The code is greatly inspired by the Django Google Analytics app.
Installation
- Install
django-matomo-api-tracking
from pypi usingpip install django-matomo-api-tracking
Setup / Configuration
-
add
matomo_api_tracking
to yourINSTALLED_APPS
setting. -
add a new variable
MATOMO_API_TRACKING
to your settings to configure the behaviour of the app:MATOMO_API_TRACKING = { 'url': 'https://your-matomo-server.com/matomo.php', 'site_id': <your_site_id>, # 'ignore_paths': ["/debug/", "/health/"], # 'token_auth': "", # e.g. "33dc3f2536d3025974cccb4b4d2d98f4" }
-
enable the middleware by adding the matomo_api_tracking middleware to the list of enabled middlewares in the settings:
MIDDLEWARE = [ ... 'matomo_api_tracking.middleware.MatomoApiTrackingMiddleware', ]
In the settings part, the ignore_path
can be used to entirely skip certain
paths from being tracked. If you specify an token_auth
, the app will also send
the client's IP address (cip parameter). But this is not required.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_matomo_api_tracking-0.1.3.tar.gz
.
File metadata
- Download URL: django_matomo_api_tracking-0.1.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7f03f3dcd17ca108ae38f20ec8bdb1fddec1bd5b94fa7327da870a5102cc073 |
|
MD5 | d8bcf93a1753d242297a3e408cd65eda |
|
BLAKE2b-256 | 14dac7b1cd709228aa9e0987a5ffbe12ad01439282c435a694013a0f997e32da |
File details
Details for the file django_matomo_api_tracking-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: django_matomo_api_tracking-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 520a788c1dbb7009ef53d0703c90cb9b26db4a97b0bf800af678a42d51c53266 |
|
MD5 | 1f6131c24a7ac3cf259ad0e74bff23b8 |
|
BLAKE2b-256 | 2d4eaef816030e091444ac68f3a4465cd19fd223ced8e9dc6d7763610671b9b2 |