Skip to main content

Django-Matomo

A simple app to add the Matomo JS tracking code to your template.

django-matomo is listed as an official Django integration package at: https://matomo.org/integrate/ (since April 2022).

The current repository has been forked from django-piwik (legacy) by Raphael “jasjukaitis” Jasjukaitis. django-piwik was listed as an official Django plugin for Matomo from 2013 to March 2022.

Requirements

  • Django

Installation

Using PyPI you can simply type into a terminal:

pip install django-matomo

or

easy_install django-matomo

Configuration

Add matomo to the list of INSTALLED_APPS in your settings.py file.

Also MATOMO_SITE_ID (e.g. 51) and MATOMO_URL (e.g. 'http://matomo.example.com/', please don’t forget the trailing slash!) are required.

In the template, put {% load matomo_tags %} to the top and add {% tracking_code %} before the </body> tag.

That’s it. Happy tracking!

Uploading to PyPi

Article on Medium (Towards Data Science) on how to upload packages to PyPi.

In short:

python setup.py sdist

twine upload dist/*

Version history

  • Version 0.1.6 README changes after accepting django-matomo as an official Matomo plugin.

  • Version 0.1.5 information on uploading to PyPi added to the README. Minor formatting changes.

  • Versions up to 0.1.4 are mainly formatting changes for the RST README format.

  • Main changes were introduced in 0.1 version of the package.

Author(s)

Copyright 2022 Mikolaj Buchwald <mikolaj.buchwald@gmail.com>

as django-piwik: Copyright 2013 Raphael Jasjukaitis <webmaster@raphaa.de>

Released under the BSD license.

Metadata

Release files for django-matomo 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-matomo 0.1.6
File Size Uploaded
django-matomo-0.1.6.tar.gz 3.2 kB Details

Release files / django-matomo-0.1.6.tar.gz

Download URL django-matomo-0.1.6.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3813b8e9c62e6c9649034648d10ef4138249c442d74199651880ddb819a5a429
BLAKE2b-256 checksum
How to use checksums
9c14225e411c8fa847a28782403243500760b426ce44171ecaef2fb5bfa0f6d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page