https://github.com/suda/django-ackee-middleware
Django middleware reporting requests to Ackee
https://github.com/suda/django-ackee-middleware
ackee analytics django django-middleware
Last synced: about 1 year ago
JSON representation
Django middleware reporting requests to Ackee
- Host: GitHub
- URL: https://github.com/suda/django-ackee-middleware
- Owner: suda
- License: mit
- Created: 2020-05-09T08:46:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T00:46:40.000Z (over 3 years ago)
- Last Synced: 2025-03-20T15:09:44.356Z (about 1 year ago)
- Topics: ackee, analytics, django, django-middleware
- Language: Python
- Size: 117 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# django-ackee-middleware
[](https://github.com/suda/django-ackee-middleware/actions)
[](https://codecov.io/gh/suda/django-ackee-middleware)
[](LICENSE)
[](https://pypi.org/project/django-ackee-middleware/)
> [Django](https://www.djangoproject.com/) middleware reporting requests to [Ackee](https://ackee.electerious.com/), self-hosted analytics tool for those who care about privacy. Alternative to using the client-side JS tracker.
## Installation
```
$ pip install django-ackee-middleware
```
If you don't have the Ackee instance yet, you can quickly [deploy it on Heroku](https://docs.ackee.electerious.com/#/docs/Get%20started#with-heroku).
## Configuration
Add the middleware as the first one in your Django `settings.py`:
```python
MIDDLEWARE = [
"ackee.middleware.TrackerMiddleware",
"django.middleware.security.SecurityMiddleware",
...
]
```
Then add the following properties:
```python
ACKEE_SERVER = "https://myackeeserver.com"
ACKEE_DOMAIN_ID = "YOUR DOMAIN ID"
ACKEE_IGNORED_PATHS = [
"^/admin/.*"
]
```
Remember to change the server and domain ID to your values.
## Development
This project is using [`pipenv`](https://pipenv.pypa.io/en/latest/) to manage the development dependencies. To install them run:
```
$ pipenv install
```
### Publishing
There are two `pipenv` scripts that make building and publishing the package easier:
* `pipenv run build` - builds the distribution package
* `pipenv run upload` - uploads the package to PyPI