Add Matomo Web Analytics tracking code to Datasette
Project description
datasette-matomo
Datasette plugin that adds Matomo Web Analytics JavaScript tracking code to a Datasette application.
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-matomo
Usage
Make your configuration available to the Datasette process as environment variables:
DATASETTE_MATOMO_SERVER_URL=https://example.com/
DATASETTE_MATOMO_SITE_ID=1
The server URL must include a final slash.
If you use datasette publish:
datasette publish heroku example.db --install datasette-matomo \
--plugin-secret datasette-matomo server_url http://example.com/ \
--plugin-secret datasette-matomo site_id 1
Note: not all datasette publish providers currently support the --plugin-secret option.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-matomo
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette-matomo-0.1.2.tar.gz.
File metadata
- Download URL: datasette-matomo-0.1.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7ff3231be1672ec91b11cf5b41b2b6e48fe0d6ec89837c2824d5bbc38518262
|
|
| MD5 |
78d0cbadc5ca2fc3c3e36796981e4428
|
|
| BLAKE2b-256 |
e366d788d8600d7e8e22a0fc877394ad97024528403699f2fecb77f1160bb809
|
File details
Details for the file datasette_matomo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: datasette_matomo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb749fdb1d342cdcce6014a25f1db78ab319e849eabc40c717d6d9b7b36eea0e
|
|
| MD5 |
24440e096b9d9444498e546c2fc13da3
|
|
| BLAKE2b-256 |
b19cb92a45e0053ea330f84fa64908aebcbb0e5a754e6dbf5cb0b333060c00ae
|