Flask-Matomo
Flask-Matomo is a library which lets you track the requests of your Flask website using Matomo (Piwik).
Installation
pip install flask-matomo
Usage
from flask import Flask, render_template
from flask_matomo import *
app = Flask(__name__)
matomo = Matomo(app, matomo_url="https://matomo.mydomain.com",
id_site=5, token_auth="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
@app.route("/")
def index():
return render_template("index.html")
if __name__ == "__main__":
app.run()
In the code above:
The Matomo object is created by passing in the Flask application and arguments to configure Matomo.
The matomo_url parameter is the url to your Matomo installation.
The id_site parameter is the id of your site. This is used if you track several websites with on Matomo installation. It can be found if you open your Matomo dashboard, change to site you want to track and look for &idSite= in the url.
The token_auth parameter can be found in the area API in the settings of Matomo. It is required for tracking the ip address.
Meta
Metadata
Release files for Flask-Matomo 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| Flask-Matomo-1.2.0.tar.gz | 3.6 kB | Without provenance | Details for Flask-Matomo-1.2.0.tar.gz |
Release files / Flask-Matomo-1.2.0.tar.gz
| Download URL | Flask-Matomo-1.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12d77ebe25545d97f6efe888ca6dc86ce7bc959eac6a05f01d781b504a3124e0
|
|
BLAKE2b-256 checksum How to use checksums |
35caf8b9f9b95d3a376006b7ae4a6e0cd4cb10cecce42fb2c91ecbb7210894bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Flask-Matomo 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.