Skip to main content

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

  1. Install django-matomo-api-tracking from pypi using pip install django-matomo-api-tracking

Setup / Configuration

  1. add matomo_api_tracking to your INSTALLED_APPS setting.

  2. 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" }

  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_matomo_api_tracking-0.1.3.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_matomo_api_tracking-0.1.3.tar.gz.

File metadata

File hashes

Hashes for django_matomo_api_tracking-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f7f03f3dcd17ca108ae38f20ec8bdb1fddec1bd5b94fa7327da870a5102cc073
MD5 d8bcf93a1753d242297a3e408cd65eda
BLAKE2b-256 14dac7b1cd709228aa9e0987a5ffbe12ad01439282c435a694013a0f997e32da

See more details on using hashes here.

File details

Details for the file django_matomo_api_tracking-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_matomo_api_tracking-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 520a788c1dbb7009ef53d0703c90cb9b26db4a97b0bf800af678a42d51c53266
MD5 1f6131c24a7ac3cf259ad0e74bff23b8
BLAKE2b-256 2d4eaef816030e091444ac68f3a4465cd19fd223ced8e9dc6d7763610671b9b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page